text
stringlengths
1
1.11k
source
dict
android Originally posted by stefan on ROS Answers with karma: 15 on 2014-08-04 Post score: 2 Original comments Comment by stefan on 2014-08-05: maybe someone can extend the pubsub tutorial with a section for changing the text of "hello world" to my custom text - could be useful Comment by gvdhoorn on 2014-08-05: @stefan: changing it should not have been so involved. All that should be needed is to build the rosjava repository from source, and have your ros android projects depend on that, instead of overwriting binary dists in '/opt/ros/..'. Comment by stefan on 2014-08-05: maybe i got smthing wrong with rosandroid and rosjava folders If you haven't already, I suggest you read through the available ros java documentation. Especially the rosjava_core documentation should be helpful. The java ROS client and interaction works a little different from the other client libraries (such as roscpp and rospy). Both your questions should be answered after this. Edit: for completeness:
{ "domain": "robotics.stackexchange", "id": 18883, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "android", "url": null }
python, sqlite, sqlalchemy a single webserver breach is catastrophic for you and for other servers. If credentials are stored as e.g. SHA-2 or SHA-3 hashes, Mallory can play dictionary words ("apple") and generated words ("secret1234") against her own GPU that computes the hash function, hoping for a match. Those are designed to be quick hash functions, so in an hour she can explore quite a large key space. We call this an "off-line" attack, since Mallory can conduct the search without contacting your on-line server. If credentials are stored as argon2id hashes, she can still launch the same attack, but it was designed to be an intentionally slow hash function so she'll be able to explore a much much smaller key space in the same amount of time. We have also forced her to purchase significantly more RAM for her GPU, again due to intentional aspects of the hash function's design. The design goals for the (earlier) pbkdf2 function were similar. Experiences with that nice bit of engineering
{ "domain": "codereview.stackexchange", "id": 45215, "lm_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, sqlite, sqlalchemy", "url": null }
So I think that somehow you should probably change all of your equations so that units are matching. So for segment 1, for example, we found the equation to be: x = 45t2 + C If you want to keep time in minutes, then because 45 km/h = 0.75 km/minute, the equation should be: x = 0.75t2 + C (At least that's what I think it should be.) 19. Apr 22, 2017 ### Bunny-chan Hahahahaha. It's OK! That's very confusing anyway! So, from the first function, we have now that for the second segment $C = 0.1875$. Which means that for $t = 2$, the position will be $0.75 \times 2 - 0.1875 = 1,3125$, which seems to match the answer graph. Is that right? 20. Apr 22, 2017 ### TomHart That looks right, based on a very quick calculation. I'm sorry I don't have any more time to spend right now. I would really like to in order to bail myself out. But I have to run my neighbor to the airport right now. Once again, I'm sorry for the bad information I gave you. But I got the same answer of 1.3125 at t = 2.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9637799472560581, "lm_q1q2_score": 0.8266996972331667, "lm_q2_score": 0.8577681031721324, "openwebmath_perplexity": 502.6945397347745, "openwebmath_score": 0.6502695083618164, "tags": null, "url": "https://www.physicsforums.com/threads/motion-graphs-and-their-units.912153/" }
navigation, gmapping <param name="map_start_y" value="0.5" /> <param name="map_multi_res_levels" value="2" /> <!-- Map update parameters --> <param name="update_factor_free" value="0.4"/> <param name="update_factor_occupied" value="0.9" /> <param name="map_update_distance_thresh" value="0.4"/> <param name="map_update_angle_thresh" value="0.06" /> <param name="laser_z_min_value" value = "-1.0" /> <param name="laser_z_max_value" value = "1.0" /> <!-- Advertising config --> <param name="advertise_map_service" value="true"/> <param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/> <param name="scan_topic" value="$(arg scan_topic)"/> <!-- Debug parameters --> <!-- <param name="output_timing" value="false"/> <param name="pub_drawings" value="true"/> <param name="pub_debug_output" value="true"/> -->
{ "domain": "robotics.stackexchange", "id": 24626, "lm_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, gmapping", "url": null }
php, object-oriented, mysql, api, rest class MyAPI extends API { protected $FacebookUser; protected $Validator; public function __construct($request, $origin) { //This contructor takes in the super global $_REQUEST array as a parameter which should contain a request and apiKey index //and also the $_SERVER['HTTP_ORIGIN'] parent::__construct($request['request']); //Should also have functionality to process an API key which should be sent with any requests from the client side application. }
{ "domain": "codereview.stackexchange", "id": 27668, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented, mysql, api, rest", "url": null }
quantum-gate, gate-synthesis, nielsen-and-chuang but Eqn(4.75) gives: ${cos^2(\pi/8)}$ ${I}$ - ${i}$ [ ${cos(\pi/8)(X+Z)+sin(\pi/8)Y}$ ] ${sin(\pi/8)}$ My question is how does this ${\theta}$ be able to simultaneously satisfy ${sin(\pi/8})$? Why does ${\theta}$ be referenced from ${cos^2(\pi/8)}$ instead of ${sin(\pi/8})$? In order to compare to the Pauli vector exponentiation formula, we need to write in terms a normalized unit vector: $${\displaystyle R = \cos^2(\pi/8) I_2 -\frac{i}{\sqrt{1+\cos^2(\pi/8)} } \times \quad \times \left [\cos(\pi/8)(X+Z)+ \sin(\pi/8)Y \right ] \sqrt{1+\cos^2(\pi/8)}\sin(\pi/8)} $$ Now, the result can be seen by inspection from the comparison to the general formula: $${\displaystyle e^{ia({\hat {n}}\cdot {\vec {\sigma }})}=I\cos {a}+i({\hat {n}}\cdot {\vec {\sigma }})\sin {a}}$$
{ "domain": "quantumcomputing.stackexchange", "id": 493, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-gate, gate-synthesis, nielsen-and-chuang", "url": null }
Example 3. If $R$ is a left primitive ring and $0 \neq e \in R$ an idempotent, then $R_1=eRe$ is left primitive: let $M$ be a faithful simple $R$-module. The claim is that $M_1=eM$ is a faithful simple left $R_1$-module. Note that $M_1 \neq (0)$ because $e \neq 0$ and $M$ is faithful. Clearly $M_1$ is a left $R_1$-module.  To see why it’s faithful, let $r_1 = ere \in R_1$ with $r_1M_1=(0).$ Then $(0)=ere^2M=ereM=r_1M.$ So $r_1=0,$ because $M$ is faithful. To prove that $M_1$ is a simple $R_1$-module let $0 \neq x_1 \in M_1.$ We need to show that $R_1x_1=M_1.$ Well, since $x_1 = ex,$ for some $x \in M,$ we have $ex_1=ex=x_1.$ Thus $R_1x_1=eRex_1=eRx_1=eM=M_1.$
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769106559808, "lm_q1q2_score": 0.8108439587819448, "lm_q2_score": 0.8311430394931456, "openwebmath_perplexity": 90.94035984365544, "openwebmath_score": 0.9459206461906433, "tags": null, "url": "https://ysharifi.wordpress.com/tag/division-ring/" }
thermodynamics, temperature, everyday-life, evaporation Title: Why do I feel cold air in the shower? Our house has a glass sliding door to the shower. The shower has the dimensions of about 2 feet wide, 5 feet long, and 6 feet high. Above the door (and shower head) there is about 1 foot of open space before the ceiling to let the heat escape. Sometimes I forget to slide the door all the way to the end of the other side, leaving about a 1 inch space in between the door and the wall. Cold air comes through so much that I always known when there is a crack, the amount of cold air I feel does not seem proportional to the opening at all. I would think that the amount of heat being produced by the shower would be enough to where I don't feel the cold air, but that does not seem to be the case.
{ "domain": "physics.stackexchange", "id": 14791, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, everyday-life, evaporation", "url": null }
kinematics, projectiles $$ X_1s =\frac{V_{vehicle*1}}{3600}$$ The range of the jump (so you know if you clear the railing) can be estimated like this, again ignoring air friction. Note this time we talk about the speed of your jumping out of the car! $$R = V_0 \sqrt{\frac{2h}{g}}$$
{ "domain": "engineering.stackexchange", "id": 4702, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, projectiles", "url": null }
Comment #44 by Rankeya on In the first line of the proof, 'valutation ring' should be valuation ring. There are also: • 3 comment(s) on Section 10.50: Valuation rings In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar). Unfortunately JavaScript is disabled in your browser, so the comment preview function will not work. All contributions are licensed under the GNU Free Documentation License. In order to prevent bots from posting comments, we would like you to prove that you are human. You can do this by filling in the name of the current tag in the following input field. As a reminder, this is tag 00II. Beware of the difference between the letter 'O' and the digit '0'.
{ "domain": "columbia.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137879323496, "lm_q1q2_score": 0.8266843926361146, "lm_q2_score": 0.8418256472515684, "openwebmath_perplexity": 224.76108175812442, "openwebmath_score": 0.8817051649093628, "tags": null, "url": "https://stacks.math.columbia.edu/tag/00II" }
as named arguments or named components of a and... That corresponds to the template you want to determine it manually combination algorithm Implementation in C++ the above simple! Press the number of elements from a set and the different ways to do this of! ) -R: start up from macOS Recovery system have a urn with a red blue. Poker hands brute force mechanism of solving statistical questions about poker hands all you need is same. Of identifiers, gene-names to be allowed, taken m at a time Description denominator of our probability formula that. Represents the size of different combinations that are possible have a urn with a pool of six how! Example take a combination lock ( should be ( a lot ) easier to values... By a space and a list, so there are 11,238,513 possible of. \ ) Customer Voice it ’ s done the nPr and nCr templates press... The supplied factors WINDOW ] to access the shortcut menu $r$ in between ) =!... Recursion limit x ] and return the whole matrix x a little bit more
{ "domain": "otvedaem.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924793940118, "lm_q1q2_score": 0.8545240355307095, "lm_q2_score": 0.8791467564270272, "openwebmath_perplexity": 756.6352661589661, "openwebmath_score": 0.5182982087135315, "tags": null, "url": "http://otvedaem.com/rw8q0t2p/compute-combinations-r-cb7d5c" }
computability, turing-machines, undecidability, decision-problem Title: Decision problem and algorithm I was reading about decision problem. I understand that decision problem tell yes/no answer for an input. The decision is based on a decision procedure also called an algorithm. The wikipedia says that It is traditional to define the decision problem equivalently as: the set of inputs for which the problem returns yes. These inputs can be natural numbers, but may also be values of some other kind, such as strings over the binary alphabet $\{0,1\}$ or over some other finite set of symbols. The subset of strings for which the problem returns "yes" is a formal language, and often decision problems are defined in this way as formal languages.
{ "domain": "cs.stackexchange", "id": 881, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computability, turing-machines, undecidability, decision-problem", "url": null }
java, object-oriented, multithreading, http, network-file-transfer System.out.println("Total join time: " + joinTime); }); Logical Issues You set an synchronization point while waiting for the validation of the URI to finish. This does not make sense to me as all the download threads will use the same URI and thus need to be verified only once before passing the URI to the Download object. You defined Download as a runnable but yet do not really make use of the thread as you have only one URL to download defined. Also, Progress is only able to handle one download URL at a time. Maybe the Progress class can therefore be managed by the Download class directly. Consider replacing wait and notifyAll with Java concurrent utils As you have some mProgress.wait() and mProgress.notifyAll() invocations throughout your code, which are inherited from Object, this should probably get replaced with one of the Java concurrent utility classes like Lock, Condition, CountDownLatch or CyclicBarrier. The JavaDoc for CountDownLatch f.e. states:
{ "domain": "codereview.stackexchange", "id": 21281, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, object-oriented, multithreading, http, network-file-transfer", "url": null }
bioinformatics, rna-sequencing, small-rnaseq Title: Problems with analysis of small RNAseq data - Adapter trimming I have always faced a problem while analyzing small RNAseq data, at the step of adapter trimming. Overview of small RNAseq (Illumina) RNA is size fractionated using columns or PAGE 3' and 5' adapter ligation cDNA synthesis PCR amplification Sequencing
{ "domain": "biology.stackexchange", "id": 942, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bioinformatics, rna-sequencing, small-rnaseq", "url": null }
human-biology, evolution, reproduction, human-physiology, sexual-reproduction Shedding or reabsorbing the endometrial lining is energetically advantageous to the female.The advantage of shedding over re-absorption may be that sperm-born pathogens are removed from the uterus. A more parsimonious explanation, however, is that the endometrium in primates has developed into too large of a structure to be completely reabsorbed by the uterus wall. Background
{ "domain": "biology.stackexchange", "id": 6862, "lm_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, evolution, reproduction, human-physiology, sexual-reproduction", "url": null }
or x² - 2x + 2ln | x+2| + 2ln | x -1| + C 25. anonymous You have 4 separates terms to take derivative. The result looks neat without fraction ! 26. anonymous *separated 27. anonymous I am still somewhat confused I don't get how they are the same 28. anonymous The first one has fraction 1/2 If you don't want fraction form, you need to multiply all terms by 2! 29. anonymous = x²/2 - x + ln | x+2| + ln | x -1| + C x² - 2x + 2ln | x+2| + 2ln | x -1| + C 30. AccessDenied How would you multiply by 2 without changing the value of the original integral? If you take the derivative of the indefinite integral multiplied by 2, you get the original function, multiplied by 2... 31. anonymous This is how you multiply: = 2 ( x²/2 - x + ln | x+2| + ln | x -1| ) + C = x² - 2x + 2ln | x+2| + 2ln | x -1| + C 32. anonymous
{ "domain": "openstudy.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102542943773, "lm_q1q2_score": 0.8123672492653726, "lm_q2_score": 0.8397339656668287, "openwebmath_perplexity": 1593.4053178848246, "openwebmath_score": 0.8716132640838623, "tags": null, "url": "http://openstudy.com/updates/507ad451e4b02f109be4c25c" }
I have deleted my previous approach to the first question because it was substandard. Instead, for $n\ge2$, we have $$\frac{2^n}{n!}=\frac{\overbrace{2\cdot2\cdot2\cdots2}^{\text{n copies}}}{1\cdot2\cdot3\cdots n}\le\frac{2\cdot2}{1\cdot2}\left(\frac23\right)^{n-2}\to0\qquad\text{as }n\to\infty$$ Alternate Approach to the Second Question Inspired by Ilya, I have moved my deleted answer from another question here. For $n\ge2x$, we have \begin{align} \frac{x^n}{n!} &=\frac{x^{\lfloor2x\rfloor}}{\lfloor2x\rfloor!}\frac{x}{\lfloor2x+1\rfloor}\frac{x}{\lfloor2x+2\rfloor}\cdots\frac{x}{n}\\[4pt] &\le\frac{x^{\lfloor2x\rfloor}}{\lfloor2x\rfloor!}\left(\frac12\right)^{n-\lfloor2x\rfloor} \end{align} Since $$\lim_{n\to\infty}\left(\frac12\right)^{n-\lfloor2x\rfloor}=0$$ we have $$\lim_{n\to\infty}\frac{x^n}{n!}=0$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.987758723627135, "lm_q1q2_score": 0.8165917886273468, "lm_q2_score": 0.8267117962054048, "openwebmath_perplexity": 264.2504921652551, "openwebmath_score": 0.9810930490493774, "tags": null, "url": "https://math.stackexchange.com/questions/77550/prove-that-lim-limits-n-to-infty-fracxnn-0-x-in-bbb-r/77553" }
asymptotics Title: Confused about proof that $\log(n!) = \Theta(n \log n)$ So I was able to show that: $\log(n!) = O(n\log n)$ without any problems. My question is when trying to prove that $\log (n!) = \Omega(n\log n)$. I was able to show that: $$\begin{align*} \log n! &= \log(1 \cdot 2 \cdot 3 \cdots n )\\ &= \log 1 + \log2 + \log3 + \dots + \log n \\ &= \log 1 + \dots + \log\tfrac{n}{2} + \dots + \log n\\ &\geq \log\tfrac{n}{2} + \log\big(\tfrac{n}{2} + 1\big) + \dots + \log n &&\text{(i.e., the larger half of the sum)}\\ &\geq \log\big(\tfrac{n}{2}\big) + \log\big(\tfrac{n}{2}\big) + \dots + \log\big(\tfrac{n}{2}\big)&&\text{(adding $\tfrac{n}2$ times)} \\ &= \log\big(\tfrac{n}{2} \cdot \tfrac{n}{2} \cdots \tfrac{n}{2}) &&\text{($\tfrac{n}{2}$ times)} \\ &= \log\Big(\tfrac{n}{2}^{\tfrac{n}{2}}\Big)\\ &= \tfrac{n}{2} log\big(\tfrac{n}{2}\big) &&\text{(by log exponent rule)} \end{align*}$$
{ "domain": "cs.stackexchange", "id": 5390, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "asymptotics", "url": null }
java, number-systems This is never required as Strings are immutable in Java. If you find yourself using it to append String values, then you should be using StringBuilder (the faster, non-synchronized version of StringBuffer, which is usually recommended unless you require the multi-threading safety of the latter): StringBuilder result = new StringBuilder(); // ... result.append(integer % 2); // add some spaces for readability // ... return result.reverse().toString(); try-with-resources // don't forget to close the Scanner inputScanner.close(); Since you are on Java 7 at least (from the use of String in switch), you should be using try-with-resources to safely and efficiently manage the underlying I/O resource used by your Scanner instance: try (Scanner scanner = new Scanner(System.in)) { // ... }
{ "domain": "codereview.stackexchange", "id": 18019, "lm_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, number-systems", "url": null }
quantum-mechanics, probability, measurement-problem, decoherence, quantum-measurements $$\alpha\ge\frac{\lambda}{d}=\frac{h}{pd}$$ where $d$ is the beam width and $\lambda$ is the wavelength of the particles. Since $E_m$ depends on field strength, there will be a change in the phase of the the atom's state $|m\rangle$ associated with the atoms passing through the field, with $\varphi_m$ being the phase change and $\varphi=\varphi_m-\varphi_n$. However, since the beam has a width and the Field is not uniform, the phase change will vary depending on the atom 'passing' through different parts of the field. This will introduce an uncertainty $\Delta\varphi$ in the phase change difference. Since the phase change is $$\varphi_m=\frac{2\pi}{h}E_m T$$ And the uncertainty in position is the width of the beam $d$ the uncertainty in the energy will be $$\frac{\partial E_m}{\partial x}d$$ So we have $$\Delta\varphi=2\pi\left(\frac{\partial E_m}{\partial x}-\frac{\partial E_n}{\partial x}\right)\frac{Td}{h}=2\pi \frac{pd}{h}\alpha$$
{ "domain": "physics.stackexchange", "id": 56114, "lm_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, probability, measurement-problem, decoherence, quantum-measurements", "url": null }
pressure Hmmm, because Diamond is still somewhat away from a closest package, the giant planets may contain a sort of carbon denser than diamond, metallic in properties. In general, all substances (not only crystalline) will transform into something with a densest package of atomic cores and a delocalized electron gas: metals, if only pressure is high enough. For hydrogen, some experimental research was/is done to find this "metallic" form. I remember an article in SCIAM some years ago. Of course all this is valid only if temperature is low enough. (For that reason we speak of planets cores!) But at the end of pressure scales in neutron stars all materia transforms to neutrons irrespective of enormous temperatures, would that be like the iron up here on the surface or does the pressure change its structure?
{ "domain": "physics.stackexchange", "id": 494, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pressure", "url": null }
javascript, node.js Title: Filtering an object JS I'm making a news aggregator using newsAPI, and have everything working - to begin with. But was wondering if the code I use to filter through an object can be made more efficient - meaning fewer lines of code. So far, it only returns what I need from the raw JSON file, then filters it using a for loop to ignore objects with blank values. Any help would be great. if (!error && response.statusCode == 200) { let data = JSON.parse(body); let articles = data.articles.map(article => { return { "title": article.title, "date": article.publishedAt, "image": article.urlToImage, "description": article.description, "link": article.url } });
{ "domain": "codereview.stackexchange", "id": 35488, "lm_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, node.js", "url": null }
Series of positive terms Convergence questions for series of positive terms are easiest to understand conceptually. Since all the terms a are assumed to be positive, the sequence of partial sums {S } must be an increasing sequence. So the least upper bound property discussed earlier comes into play -- either the sequence of partial sums has an upper bound or it doesn't. If the sequence of partial sums is bounded above, then it must converge and so will the series. If not, then the series diverges. That's it. n n Tests for convergence of series of positive terms: The upper bound observations give rise to several "tests" for convergence of series of positive terms. They all are based pretty much on common sense ways to show that the partial sums of the series being tested is bounded are all less than those of a series that is known to converge (or greater than those of a series that is known to diverge). The names of the tests we will discuss are...
{ "domain": "slideplayer.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9971550909268263, "lm_q1q2_score": 0.819850079376929, "lm_q2_score": 0.8221891327004132, "openwebmath_perplexity": 301.85986725056046, "openwebmath_score": 0.945933997631073, "tags": null, "url": "http://slideplayer.com/slide/4044023/" }
botany, plant-physiology, fruit I think it has to do with vine vs tree, and how the fruit is attached and hangs/lays.
{ "domain": "biology.stackexchange", "id": 2494, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "botany, plant-physiology, fruit", "url": null }
image-processing, fourier-transform, edge-detection While I fail to grasp is that when treating real images such as the ones presented, why are edges in the images visible as edges in the frequential domain ? In this example, there is a diagonal line in the FFT image (let's forget about the vertical and horizontal line which I think are artefacts based on the way FFT is computed, needs a periodical image, etc). This diagonal line is probably caused the girl's hat. But as I understand it, the line in FFT domain means a sum of sines oriented in the same way but with different frequencies. How does that result in an edge when we convert back ? Since edges are high frequency information, wouldn't an edge be represented by one very bright point in the FFT ? Does it have to do with adding different sines so that they cancel each other out on some portions of the image ? Does the phase image has anything to do with it ? A more compelling example might be the following image set :
{ "domain": "dsp.stackexchange", "id": 6766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, fourier-transform, edge-detection", "url": null }
quantum-field-theory, particle-physics, gauge-theory, quantum-electrodynamics, quantum-chromodynamics which should be zero for the conservation of energy! what i am doing wrong? thank you for any help. Ok after some days of thinking i belive i've solved both problems, so i tought i just answer my self for future reference. (verba volant scripta manent)
{ "domain": "physics.stackexchange", "id": 24651, "lm_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, particle-physics, gauge-theory, quantum-electrodynamics, quantum-chromodynamics", "url": null }
quantum-state, measurement, textbook-and-exercises, probability Title: Probability of measuring one qubit from the state of two qubits I am new to quantum information and I am trying to work on some problems but I have confused myself over a qubit problem. I have the state of two qubits $|\psi\rangle_{AB}=a_{00}|00\rangle+a_{01}|01\rangle+a_{10}|10\rangle+a_{11}|11\rangle$ and $\sum_{j,k} |a_{j,k}|^2=1$. If I am to measure qubit B in the basis {$|0\rangle_{B},|1\rangle_{B}$}, what is the probability of getting $|1\rangle_B$?
{ "domain": "quantumcomputing.stackexchange", "id": 2402, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-state, measurement, textbook-and-exercises, probability", "url": null }
### Show Tags 27 Feb 2014, 11:08 1 KUDOS Expert's post hieracity wrote: Bunuel wrote: Yash12345 wrote: If 4^(4x) = 1600, what is the value of [4^(x–1)]^2? A. 40 B. 20 C. 10 D. 5/2 E. 5/4 $$4^{4x} = 1600$$ --> $$4^{2x} = 40$$ - $$(4^{(x-1)})^2=4^{2(x-1)}=4^{2x-2}=\frac{4^{2x}}{4^2}=\frac{40}{16}=\frac{5}{2}$$. Hi Bruno, thank you for posting all these answers. They are a great tool!! Quick question though. I just want to confirm the steps of $$4^{4x} = 1600$$ TO $$4^{2x} = 40$$ - Do you just squareroot the two sides? $$\sqrt{4^{4x}} = \sqrt{1600}$$ So the base, 4, doesn't change, only the ^4x gets rooted to ^2x. Is that right? Thank you again! Yes: $$4^{4x} = 1600$$; $$(4^{2x})^2 = 40^2$$; $$4^{2x} =40$$. Hope it's clear. _________________ GMAT Club Legend Joined: 09 Sep 2013 Posts: 10160 Followers: 480 Kudos [?]: 124 [0], given: 0 Re: If 4^4x = 1600, what is the value of (4^x–1)^2? [#permalink] ### Show Tags 26 Jul 2015, 23:08 Hello from the GMAT Club BumpBot!
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes.\n2. Yes.\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8116760165346717, "lm_q2_score": 0.8116760165346717, "openwebmath_perplexity": 12107.593772595445, "openwebmath_score": 0.6843048334121704, "tags": null, "url": "http://gmatclub.com/forum/if-4-4x-1600-what-is-the-value-of-4-x-161823.html?sort_by_oldest=true" }
python, game, pygame if self.rect.top < 0: self.rect.top = 0 self.veloc_y = uniform(0.0, 1.0) if self.rect.rigth < 0: self.rect.left = self.width if self.rect.left > self.width: self.rect.right = 0 def start_engine(self): self.fuel -= 5 self.veloc_x = self.veloc_x + 0.33 * math.sin(math.radians(-self.angle)) self.veloc_y = self.veloc_y - 0.33 * math.cos(math.radians(self.angle)) @property def altitude(self): return 1000 - self.rect.top * 1.436 @property def can_land(self): return self.fuel > 0 and self.damage < 100 def has_landing_position(self): return self.can_land and (self.veloc_y < 5) and (-5 < self.veloc_x < 5) and (-7 <= self.angle <= 7) def handle_inputs(self, pressed_key, alert_key=None): if not self.can_land: return
{ "domain": "codereview.stackexchange", "id": 30250, "lm_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, game, pygame", "url": null }
navigation, ekf, robot-pose-ekf Original comments Comment by Mahyar on 2014-02-07: thank you, my gole is fusing /odom and /vo , but i read kalman could increase accuracy of data even for one sensor, so i started for /odom, but the result of /odom_combined is the same of /odom. do you have any idea? Comment by Chad Rockey on 2014-02-07: That's not how Kalman filters work. With only one data source, at best, you get the same data out. At worst you can achieve a "smoothed" laggy output version of your original data (depending on your update model and process/sensor noise values). Comment by Chad Rockey on 2014-02-07: That's assuming you're filtering on variables you're directly measuring. Kalman filters are also very good at measuring "hidden" values. For instance, calculating accelerations from GPS or velocity commands. Or estimating model parameters from output data (battery time until full while charging).
{ "domain": "robotics.stackexchange", "id": 16909, "lm_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, ekf, robot-pose-ekf", "url": null }
programming-languages, type-theory, polymorphisms So, the confusion might be that you understood the sentence as "the packages are open at a given time", as opposed to "a programmer would be expected to open the package at a given time".
{ "domain": "cs.stackexchange", "id": 14579, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-languages, type-theory, polymorphisms", "url": null }
quantum-mechanics, quantum-field-theory, particle-physics, large-hadron-collider Title: Why does both the electron and the antineutrino have spin only $+1/2$ in the Wu experiment? In ${\rm Co}\rightarrow {\rm Ni}^* + e^- + \bar{\nu}_e$, the Wu experiment, it is said that $J_{co}$ = 5, $J_{Ni}$ = 4 and hence J of "$e^- + \bar{\nu}_e$" system is 1. If orbital angular momentum is zero, its S=J=1. Because of this we say both electron and anti-neutrino has $S_z$=1/2. But I guess, if S=1, $S_z$ of this total system($e^- + \bar{\nu}_e$) can also be 1,0 or -1. This leads to $S_z$ of electron and neutrino to have values $S_z$=0,1/2 or -1/2. Then, why do we take only $S_z$ = +1/2 for both electron and anti-neutrino? The point is that the $^{60}$Co nuclei beam in the Wu experiment was polarized by a strong magnetic field so that all the spin was in the direction of the magnetic field (the $z$ direction): $J_{z \rm Co} = J_{\rm Co} = 5$.
{ "domain": "physics.stackexchange", "id": 42672, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-field-theory, particle-physics, large-hadron-collider", "url": null }
c++, linked-list, pointers These are both exceptionally easy to implement if you have a swap() noexcept method. Note 1: Assignment operators don't usually return const references. Note 2: The move assignment operator does not take a const input. Moving the source into the destination will modify it. LinkedList const& operator=(LinkedList const& input) { LinkedList copy(input); swap(copy); return *this; } LinkedList& operator=(LinkedList&& input) noexcept { clean(); swap(input); return *this; } You have a move constructor. Why don't you have a move push()? void push(const T&); Nice. void pop(); Clea separation of the pop from the peek(). Why are you returning by value? T peek() const;
{ "domain": "codereview.stackexchange", "id": 37191, "lm_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++, linked-list, pointers", "url": null }
c++, linked-list, queue bool empty() const { return size_value == 0; } bool full() const { return 0; } int size() const { return size_value; } T top() const { if(empty()) { throw "Queue is empty"; } return front->value; } void clear() { while(!empty()) { pop(); } } }; push could be streamlined: back will always point to the new node no matter what: auto new_node = make_shared<Node>(t, nullptr); if (front) { back->next = new_node; } else { front = new_node; } back = new_node; The emptiness of the queue is tested differently in push (which tests if (front)) versus pop/top (which tests empty() aka size_value == 0). Technically nothing is wrong, but it gives an uneasy feeling. Better use an uniform test. top throwing an exception could be an overkill. Consider returning a std::pair<bool, T>, or std::optional<T>.
{ "domain": "codereview.stackexchange", "id": 43612, "lm_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++, linked-list, queue", "url": null }
general-relativity, metric-tensor, tensor-calculus, vectors, covariance Now we define the dual basis $\mathbf{e}^i $, which is also often (incorrectly) referred to as the contravariant basis by $$\mathbf{e}^i (\mathbf{e}_j) = \delta^i_j$$ Therefore we can also decompose a covector $\omega$ into its components as $\omega = \omega_i \mathbf{e}^i$. With that, we have $$\omega(v) = \omega_i v^i$$ From here, how do we derive the transformation properties of the objects? Suppose we define an alternative basis $\bar{\mathbf{e}}_i = A^j_i \mathbf{e}_j$ where $A$ is any invertible matrix. Scalars, vectors and covectors exist independently of any basis and must therefore remain invariant under any change of basis. So we see that $v^i$ and $\mathbf{e}^i$ transform with $A^{-1}$ while $\omega_i$ transforms with $A$.
{ "domain": "physics.stackexchange", "id": 79293, "lm_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, metric-tensor, tensor-calculus, vectors, covariance", "url": null }
qiskit Title: Is it better to initialize quantum circuits in Qiskit by passing QuantumRegister and ClassicalRegister objects? From the perspective of building quantum computation software based on Qiskit, which approach to defining quantum circuits is more robust? from qiskit.circuit import QuantumCircuit, QuantumRegister, ClassicalRegister qr1 = QuantumRegister(3, 'qr1') qr2 = QuantumRegister(4, 'qr2') cr = ClassicalRegister(4, 'cr') circ = QuantumCircuit(qr1, qr2, cr) OR, circ = QuantumCircuit(7, 5)
{ "domain": "quantumcomputing.stackexchange", "id": 2475, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit", "url": null }
genetics, synthetic-biology, terminology Title: Difference between genetic engineering and synthetic biology I've recently seen the term synthetic biology being used to describe research involving genetic modification of organisms. What is the difference between synthetic biology and genetic engineering? Is it just a new term for the same thing, or is it something different? Does one of the two terms encompass the other? My understanding is that synthetic biology is genetic engineering 2.0. The difference is in the approach. Whereas genetic engineering projects are usually ad hoc, synthetic biology aims to apply proper engineering principles such as standardisation, modularisation, and reusability. Synthetic biologists create and use libraries of standard parts that are characterised, so they can be easily reused in projects. A part could be a gene, a terminator, a promoter, etc.
{ "domain": "biology.stackexchange", "id": 9515, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, synthetic-biology, terminology", "url": null }
fluid-dynamics, acoustics, everyday-life, piezoelectric (Of course, this is the one fact in the article that has a [citation needed] marker.) Anyway, clearly these droplets are fairly small. The question is, how small exactly? Bonus (related) question: Could you create an "ink"jet printer that deposited individual molecules by vibrating the liquid at a swifter rate? According to one source Print heads and droplet sizes, a picolitre is the standard size of an inkdrop, with 15 billion drops in a tablespoon. These drops are obviously far too small to see without optical aid. If it wasn't engineering, I would extend your post to 3 D printers, but I do believe this aspect is not a directly physics related question. Bonus (related) question: Could you create an "ink"jet printer that deposited individual molecules by vibrating the liquid at a swifter rate?
{ "domain": "physics.stackexchange", "id": 38872, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, acoustics, everyday-life, piezoelectric", "url": null }
ros2, gazebo-11 [gzserver-1] [INFO] [1695754873.015334446] [turtlebot3_joint_state]: Going to publish joint [wheel_left_joint] [gzserver-1] [INFO] [1695754873.015355489] [turtlebot3_joint_state]: Going to publish joint [wheel_right_joint] [INFO] [spawn_entity.py-4]: process has finished cleanly [pid 1131] [gzclient-2] gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:728: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed. [ERROR] [gzclient-2]: process has died [pid 1127, exit code -6, cmd 'gzclient'].
{ "domain": "robotics.stackexchange", "id": 38684, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2, gazebo-11", "url": null }
Given a circular ordering of the edges of a graph G, its GEM can be found by making a cycle of 2d vertices for each degree-d vertex of G, two for each edge, with the pairs of vertex for each incident edge occurring in the cycle in the chosen circular order, and then for each edge e of G linking the two pairs of GEM edges for the two endpoints of e into a rectangle. If you want an oriented embedding the choice of how to link these four vertices into a rectangle should be consistent with the circular orderings, otherwise it can be arbitrary.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877700966098, "lm_q1q2_score": 0.8002951067506798, "lm_q2_score": 0.8244619242200082, "openwebmath_perplexity": 179.88078416691525, "openwebmath_score": 0.731616199016571, "tags": null, "url": "https://cstheory.stackexchange.com/questions/11648/finding-a-dual-of-a-graph" }
c#, programming-challenge, primes namespace ProjectEulerTasks { class Program { static void Main(string[] args) { int no_of_primes_found = 0; int current_number = 0; List<int> found_primes = new List<int>(); bool n_minus_found = false; bool n_plus_found = false; found_primes.Add(2); found_primes.Add(3); found_primes.Add(5); found_primes.Add(7); found_primes.Add(11); found_primes.Add(13); current_number = 12; no_of_primes_found = 6;
{ "domain": "codereview.stackexchange", "id": 18512, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, programming-challenge, primes", "url": null }
javascript, beginner, to-do-list It is defined inside of curly brackets { } the key is a name to reference the value, and does not need quotes. The value needs quotes unless you want to use a variable. Also numbers do not need quotes for the values. Values can be objects or arrays as well. And the pairs are delimited by a comma ,. As long as you follow these rules javascript does the rest. var home = '1234 Fake St.'; var example = {date: '12/01/2016', time: '9:42am', location: home, peopleAttending: 10};
{ "domain": "codereview.stackexchange", "id": 23177, "lm_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, beginner, to-do-list", "url": null }
ultrasonic-sensors Title: Ultrasonic sensor range and shape I have been looking for a cheap ultrasonic sensor that is not blind under +/-30 cm but the only sensors I could find use the following shape, which is not suitable for my project (because of the robot design that only has 1 hole, and not 2..) : Is there any chance to find a sensor with that other shape with a range starting around 5cm ? Actually I am wondering if that 2nd shape makes this constraint mandatory or if I just did not found the appropriate product. A single transducer sensor has to both send out the sound and then sense the return sound. It takes time for the vibration to stop after making the sound and that is time it can't sense a return. So close distances can't be sensed by a single transducer sensor.
{ "domain": "robotics.stackexchange", "id": 1036, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ultrasonic-sensors", "url": null }
ros, gps-umd, gps-common You may want to read up a bit more on UTM, Wikipedia has a really good explanation of the reasoning behind UTM.
{ "domain": "robotics.stackexchange", "id": 5201, "lm_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, gps-umd, gps-common", "url": null }
classical-mechanics I'm at a loss as to how to correctly calculate this acceleration. My current attempt is a rearrangement of $F=ma$ - $a = \frac{F}{m}$. In this scenario I have $F = \frac{P}{\text{modelled velocity for power}} - \frac{1}{1- \text{drivetrain loss}} ( F_{\text{gravity}} + F_{\text{rolling}} + F_{\text{drag}})$. What I'm doing is calculating the force from the model that is above the current forces the rider is experiencing when they don't apply any force to the pedals. This results in acceleration if the rider is travelling under the modelled velocity for a given power, and decelleration if they are travelling at a velocity greater than the modelled velocity (as they are unable to overcome drag).
{ "domain": "physics.stackexchange", "id": 27311, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics", "url": null }
python, performance, python-2.x, iterator, iteration Current extended question: I am currently attempting to create a method that will create the objectively best schedules based on how close the classes are to mid-day. I believe it works fine, but it takes so long to run I cant get an output. So I am attempting to bypass the code above all together by creating my own itertool product that will check for overlaps as it builds in the hopes that it will be faster. Here is what I have so far: def product(*args): pools = map(tuple, args) result = [[]] for pool in pools: result = [x+[y] for x in result for y in pool for time in x for classTx in time for classTy in y if not (int(classTx[0])<=int(classTy[1]) and int(classTx[1])>=int(classTy[0])) and classTx[2]!=classTy[2] ] for prod in result: yield tuple(prod)
{ "domain": "codereview.stackexchange", "id": 26995, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-2.x, iterator, iteration", "url": null }
So shall I just accept my fate and consider this to be an exercise in multiplication and division with remainder? • It might help to consider $$\operatorname{Aut}(\Bbb Z_{31})\cong (\Bbb Z/31\Bbb Z)^*.$$ Just as another perspective . . . – Shaun Apr 21 at 22:10 • Could you please expand on that? I tried myself and it wasn't particularly fruitful for me, but anything involving morphisms looks promising and elegant! – 0xd34df00d Apr 22 at 0:04 • The idea wasn't fully fledged, @0xd34df00d, I'm afraid; it would just have been the first place I'd look. Perhaps if you examine a proof of the isomorphism, something'd pop out. Sorry :) – Shaun Apr 22 at 5:39 By lil' Fermat and Lagrange's theorem, all non-zero elements in $$\mathbf Z/31\mathbf Z$$ have order a divisor of $$30$$. So the order of $$9$$ is among $$\;\{2, 3,5,6,10,15,30\}$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985936370890583, "lm_q1q2_score": 0.8419036462005337, "lm_q2_score": 0.8539127585282745, "openwebmath_perplexity": 169.5215730965175, "openwebmath_score": 0.9478173851966858, "tags": null, "url": "https://math.stackexchange.com/questions/3196392/computing-the-order-of-9-31-in-mathbbz-31-mathbbz/3196421" }
performance, vba, unicode, utf-8 If bytesPerCode = 3 And codePoint < &H800& Then Err.Raise 5, methodName, "Overlong encoding" ElseIf bytesPerCode = 4 And codePoint < &H10000 Then Err.Raise 5, methodName, "Overlong encoding" End If
{ "domain": "codereview.stackexchange", "id": 44528, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, vba, unicode, utf-8", "url": null }
ros2 Originally posted by JesperSmith on Gazebo Answers with karma: 1 on 2018-04-10 Post score: 0 My bad. Recompiling ROS2 from source fixed the issue. Originally posted by JesperSmith with karma: 1 on 2018-04-11 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 4252, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
algorithm, python-3.x def total_triangles(the_triangles: [(float, float, float)]) -> [float]: """ :param the_triangles: the triangles of points to add up :return: a list of the totals time: O(len(the_triangles)) space: O(len(the_triangles)) """ vec: [float] = [0.0] * len(the_triangles) for row in range(len(vec)): vec[row] = the_triangles[row][0] + the_triangles[row][1] + the_triangles[row][2] return vec def user_output(the_sums: [float]) -> None: """ :param the_sums: the calculated sums :return: None Output: std output """ row = 0 for number in the_sums: if row % 3 == 0: print('', end='\n') print(str(number), end=" ") row = row + 1 print('\n', end='')
{ "domain": "codereview.stackexchange", "id": 40363, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, python-3.x", "url": null }
objective-c, ios git add . git commit -m"stream of consciousness networking refactor" git push codereview 19307/dependency-inversion-injection-networking-code-in-model-classes
{ "domain": "codereview.stackexchange", "id": 2809, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c, ios", "url": null }
before the advent of credit cards, and are preserved here in digital form, should they disappear from the real world in the next 20 or so years (here at Facade, we consider. How to Solve Basic Probability Problems Involving a Coin Flip. The probability would be 1/50 put it this way, the first possible is: 1 head, 49 tails. Coin tosses are a popular way of picking a random winner. When doing a coin toss probability experiment decide how many times you intend to flip a coin. Over a large number of tosses, though, the percentage of heads and tails will come to approximate the true probability of each outcome. Binomial Probability Formula A probability formula for Bernoulli trials. Experimental and Theoretical Probability Probability is the mathematics of chance. Probability. Each outcome has a probability of 1/2. Each coin flip represents a trial, so this experiment would have 3 trials. Under normal conditions probability calculations can give us good ideas of what to expect from
{ "domain": "gruppokamengepavia.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9861513873424044, "lm_q1q2_score": 0.8039426459541658, "lm_q2_score": 0.8152324848629215, "openwebmath_perplexity": 305.28230835746405, "openwebmath_score": 0.7786978483200073, "tags": null, "url": "http://yqxs.gruppokamengepavia.it/coin-flip-probability.html" }
acid-base, water, safety Title: Why doesn't Epsom salt dissolved in water act like sulfuric acid? People take baths in it so it clearly doesn't. But if epsom salt is the salt of sulfuric acid when it dissolves the chemical ions present in sulfuric acid should also be present in the bath water and in abundance enough to melt you.. right? I also remember that water autodissociates into hydronium and hydroxide, so my other question is why wouldn't plain water simultaneously be a acid and a base and also just melt you? If there's a trillion (or whatever) water molecules next to your skin and even a tiny fraction of them turn into an acid and some of them turn into a base, there'd cumulatively be a lot of acid on your skin. I can't imagine adding salt which would also ionize could help things. Well, as you might have guessed, it's the $\ce{H+}$ in sulfuric that is dangerous, not the $\ce{SO4^2-}$. So, Epsom salts, being $\ce{MgSO4}$, aren't very dangerous.
{ "domain": "chemistry.stackexchange", "id": 6885, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acid-base, water, safety", "url": null }
value is connected to only one input value: →! Functions usually work on sets with infinitely many elements to find out more you can injective. Functions that have inverse functions are said to be invertible a what is bijective function to one and onto or function! Beautiful invertable functions... Today we present... ta ta taaaann.... the bijective functions functions have!, like that rules, to find out more you can read injective, surjective and bijective be. Or bijection is a bijection are said to be invertible that is an! Roof Scupper Detail, How Long To Boil San Pedro, Redding, California Population 2020, 7 Days To Die Facts, Daytime Tv Awards, Son Heung Min Fifa 21 Card, Baby Monkey From Tarzan, Steelcase Leap V2 Mesh, ">
{ "domain": "lyaart.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9626731105140616, "lm_q1q2_score": 0.8311638749216445, "lm_q2_score": 0.8633915976709976, "openwebmath_perplexity": 565.8390496117695, "openwebmath_score": 0.8533709645271301, "tags": null, "url": "http://lyaart.com/lendingtree-email-khutddb/5e29e2-what-is-bijective-function" }
The following code works: Derivative[1][Abs][x_] := Re[ Conjugate[x] D[x, s] ]/Abs[x]/D[x, s]; Plot[D[Abs[k[s]], s] /. k -> kf /. s -> ss, {ss, 0, 1}] It is worth noticing that now we can easily plot derivatives of compound functions of Abs. Plot[D[1/(1 + Abs[k[s]]), s] /. k -> kf /. s -> ss, {ss, 0, 1}] We can go a bit further and add the second derivative as well! Derivative[2][Abs][ x_] := (Re[Conjugate[x] D[x, {s, 2}]]/Abs[x] + Im[Conjugate[x] D[x, s]]^2/(Abs[x]^3))/D[x, {s, 2}]; Derivative[1][Abs][x_] := Re[Conjugate[x] D[x, s]]/Abs[x]/D[x, s]; Derivative[1][Re][x_] := Re[D[x, s]]/D[x, s]; Derivative[1][Conjugate][x_] := Conjugate[D[x, s]]/D[x, s]; Plot[D[Abs[k[s]],{s,2}] /. k -> kf /. s -> ss, {ss, 0, 1}] There is one problem with this solution though: D[x, s] means that we can only derivate Abs in respect to s. I dont know how to generalize this and any help is welcome.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9449947132556618, "lm_q1q2_score": 0.8243636524891185, "lm_q2_score": 0.8723473697001441, "openwebmath_perplexity": 2780.8455096183543, "openwebmath_score": 0.4345690906047821, "tags": null, "url": "https://mathematica.stackexchange.com/questions/118606/ndsolve-and-differentiation-of-abs" }
special-relativity, metric-tensor, vectors, invariants Title: Confusion about Lorentz invariance of scalar product I am a bit confused about the way that Lorentz invariance of the scalar product $A^\mu g_{\mu\nu}B^\nu$ is proved. Usually, the proof would go like this (see also e.g. this Physics SE question). The transformed product is $A^{'\mu}g_{\mu\nu}B^{'\nu} = g_{\mu\nu}\Lambda^{\mu} _{\ \ \ \rho}A^\rho\Lambda^{\nu} _{\ \ \ \sigma}B^\sigma = A^\rho g_{\rho\sigma}B^\sigma $, since we define Lorentz transformations by the condition $\Lambda^{\mu} _{\ \ \ \rho}g_{\mu\nu}\Lambda^{\nu} _{\ \ \ \sigma}=g_{\rho\sigma}$.
{ "domain": "physics.stackexchange", "id": 93738, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, metric-tensor, vectors, invariants", "url": null }
logic, formal-methods, hoare-logic Title: How to solve for the precondition give a postcondtion that must satisfy two conditions I tried solving past exam question but there is this one that I haven't been able to solve. The question states that a suitable precondition should be found for the statement. $$ a= i +2; i++\{(a = 7)\land(i = 5)\} $$ Here's my solution and where I got stuck: $$ wp(a= i +2; i++,(a = 7 \land i = 5) \\ =wp(a= i +2, wp(i=i+1,a = 7\land i = 5) $$ I've tried solving it intuitively and I arrive at the conclusion that no such value for ii should exist. I haven't been able to find a rule to combine the two predicates of the post-condition. Please I would like to know when solving similar questions can I change the ^ to an algebra symbol or should I take the relevant condition and find the weakest precondition with that. The rules for $wp$ are straightforward for non-loops: $$wp(c_1 ; c_2, V) = wp(c_1, wp(c_2, V))$$ $$wp(x := e ; V) = V\left[x \mapsto e\right]$$
{ "domain": "cs.stackexchange", "id": 11892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "logic, formal-methods, hoare-logic", "url": null }
urdf, ros-melodic, roslaunch, xacro Now I have updated the consult output from the log file and my xacro file. Comment by mgruhler on 2020-03-31: Now you got rid of the command that you should run, okay... The path looks better now. So, how do you launch it? Judging from the console output, this seems to be rather a problem of the launch file then the xacro. There is no mention of the xacros in any of the logs. It would be beneficial if you could provide a (not) working example with that we can reproduce the problem. If you cannot share the full source code, start by trimming away unnecessary stuff from the xacro and launch files until you identify what causes the problem. If you can then share the files this would help debugging a lot... Comment by Heho on 2020-03-31: I have upload the whole package to GitHub(same link)."display.launch" can run normally while "robot.launch " can't work. The problem is only within your robot.launch (I've updated your question).
{ "domain": "robotics.stackexchange", "id": 34658, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "urdf, ros-melodic, roslaunch, xacro", "url": null }
java, algorithm, compression, binary-tree @Test public void testEncode() { assertEquals(expectedEncodedString, huffmanCode.encode(inputString)); } @Test public void testDecode() { assertEquals(inputString, huffmanCode.decode(huffmanCode.encode(inputString))); } } General Classes not carefully designed for extension should be marked `final`. root is problematic as a class-level variable. The API of HuffmanCode implies that decode() depends only on the encoded string, and that one could call decode more than once with different values. That will fail, though. The code only works if you call encode directly before the corresponding decode.
{ "domain": "codereview.stackexchange", "id": 43019, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, compression, binary-tree", "url": null }
quantum-field-theory, renormalization, phase-transition, higgs, symmetry-breaking $$ Using the definition of $\bar{\lambda}$ and expanding to leading order in $\lambda$ gives Eq. \ref{eq2}, but now we have used our knowledge of how the theory continuously changes with the scale $M$ to improve perturbation theory. If we now consider the $\phi_{\mathrm{cl}} \rightarrow 0$ limit, we see that $\bar{\lambda}$ smoothly goes to zero, and the analysis proceeds without issue. The minimum remains at $\phi_{\mathrm{cl}}$ at the transition, and therefore the phase transition is continuous.
{ "domain": "physics.stackexchange", "id": 63283, "lm_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, renormalization, phase-transition, higgs, symmetry-breaking", "url": null }
of, say, real numbers. The dot product fulfills the following properties if a, b, and c are real vectors and r is a scalar.[3][4]. ) For instance, the dot product of a vector with itself would be an arbitrary complex number, and could be zero without the vector being the zero vector (such vectors are called isotropic); this in turn would have consequences for notions like length and angle. r }\) Then $$\vu \cdot \vv = \vv \cdot \vu$$ (the dot product is commutative), and That is, the dot product of a vector with itself is the square of the magnitude of the vector. 35 0. Properties of the dot product. ‖ For the abstract scalar product, see. Your email address will not be published. Your email address will not be published. To avoid this, approaches such as the Kahan summation algorithm are used. Example 2: Let there be two vectors |a|=4 and |b|=2 and θ = 60°. The scalar product of two vectors given in cartesian form 5 5. FREE Cuemath material for JEE,CBSE, ICSE for excellent results! a
{ "domain": "lockxx.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9441768557238083, "lm_q1q2_score": 0.804394116012974, "lm_q2_score": 0.8519528000888387, "openwebmath_perplexity": 568.259313630565, "openwebmath_score": 0.8666537404060364, "tags": null, "url": "https://lockxx.com/xom8445/45af58-properties-of-dot-product" }
ros Originally posted by DevonW on ROS Answers with karma: 644 on 2014-08-29 Post score: 0 Did you have moveit in your workspace at some point in the past, and have you removed it since then? The cmake config files for packages can often be left behind in the build directory of your workspace even after you remove the package from your src directory. I've found that the easiest fix for this is to remove my build and devel directories and rebuild my workspace from scratch. Originally posted by ahendrix with karma: 47576 on 2014-08-29 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by DevonW on 2014-08-29: I did attempt to remove the /build /devel folders and I still received that error. Indeed it was in src before. What fixed it was installing the source code of moveit again and compiling with it However, that should be unnecessary so I'll try removing all the source and /devel /build and try again.
{ "domain": "robotics.stackexchange", "id": 19231, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
c#, sql, recursion, sql-server, reflection Bonus tip Generally, using .Take() to take all but the last element isn't recommended in my opinion as .Take() is suitable for all IEnumerable<T> but in order to obtain the length of a pure IEnumerable<T> you need to call .Count() which iterates the collection once and you need to iterate the collection once again to perform the O(n) operation .Take(). It might be better to implement your own extension method which ensures that there is a single iteration over the IEnumerable<T> for example you might utilise the enumerator ? This doesn't concerns you however since you are using array and obtaining the length of array is O(1) operation while the the same operation on pure IEnumerable<T> would be O(n). Suggestions
{ "domain": "codereview.stackexchange", "id": 23763, "lm_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#, sql, recursion, sql-server, reflection", "url": null }
climate-change, air-pollution, pollution, carbon This is pretty confusing and took me a while to track down, but I figured it out when I noticed that the value in the first column is simply the sum of the values in the next three columns, which only makes sense once you understand that those three values are already converted to equivalent $\ce{CO2}$ emissions (or $\ce{CO2e}$). There are a couple other minor issues with your calculation: GWP is a factor per unit mass, so there's no need to convert to US tons. The 12,000 kWh figure is for gas usage, or what's recorded at the meter. Since no furnace is 100% efficient, this means that the heating load (how much heat is actually added to the home) will be less. For years, natural gas furnaces had an efficiency of 80%, but newer models can reach closer to 98%. Let's assume it's 90% on average. This means the actual heating load is $12\,000 \times 0.9 = 10\,800\ \text{kWh}$, which makes the electricity needed to provide the same amount of heat $10\,800 \div 3 = 3\,600\ \text{kWh}$.
{ "domain": "earthscience.stackexchange", "id": 2353, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "climate-change, air-pollution, pollution, carbon", "url": null }
physical-chemistry, heat The formula can be corrected for real materials by introducing the emissivity $\varepsilon$: $$P=\varepsilon\cdot\sigma\cdot A\cdot T^4$$ For an ideal black body, the emissivity is $\varepsilon=1$. For polished metal surfaces, the values are significantly lower. For example, for a hot black frying pan with $\varepsilon\approx1$, $A\approx600\ \mathrm{cm^2}=0.06\ \mathrm{m^2}$, and $T\approx230\ \mathrm{^\circ C}\approx500\ \mathrm K$, the power may be estimated as $$\begin{align} P&=\varepsilon\cdot\sigma\cdot A\cdot T^4\\ &=1\times5.670\,367\times10^{-8}\ \mathrm{W\ m^{-2}\ K^{-4}}\times0.06\ \mathrm{m^2}\times\left(500\ \mathrm K\right)^4\\ &\approx200\ \mathrm W \end{align}$$ However, in addition to thermal radiation, heat transfer also occurs via thermal convection and thermal conduction. You could exclude these modes by placing the frying pan in a vacuum.
{ "domain": "chemistry.stackexchange", "id": 5325, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, heat", "url": null }
ros, actionlib-tutorials Originally posted by gvdhoorn with karma: 86574 on 2017-07-02 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by gvdhoorn on 2017-07-02: Did this also clear up the problem with the output of the server binary? Comment by achille on 2017-07-02: It did. Graph looks different from the one on the tutorial though and still has this weird 'color' attribute. Bedankt! Comment by gvdhoorn on 2017-07-03: The color that you see is a bug. See #q249553. Comment by count_dueki on 2018-06-17: I got the same problem that achille had. even when I follow the guidelines gvdhoorn provided still there is no output from the binary server. But topics with subs and pubs are present, yet not connected to the node. Any ideas?
{ "domain": "robotics.stackexchange", "id": 28266, "lm_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, actionlib-tutorials", "url": null }
ros, dynamixel g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_write.cpp -o .objects/group_bulk_write.o g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_sync_read.cpp -o .objects/group_sync_read.o ../../src/dynamixel_sdk/group_sync_read.cpp: In member function ‘bool dynamixel::GroupSyncRead::getError(uint8_t, uint8_t*)’: ../../src/dynamixel_sdk/group_sync_read.cpp:204:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 204 | return error[0] = error_list_[id][0]; | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_sync_write.cpp -o .objects/group_sync_write.o
{ "domain": "robotics.stackexchange", "id": 37983, "lm_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, dynamixel", "url": null }
biochemistry, lab-techniques, biophysics, biotechnology, gel-electrophoresis ampere is increased and the ampere has to get higher if the voltage is increased (at least if I understand it correctly) the travel speed should be increased the higher the ampere is set. I would neither decrease nor increase the concentration of the buffer. Maybe easily using another kind of buffer would help you. But this depends on the different samples you are running. Maybe that could help you: Brody, J.R., and Kern, S.E. (2004). History and principles of conductive media for standard DNA electrophoresis. Analytical Biochemistry 333, 1–13. The resistance is more or less given. Therefore as far as I know: No.
{ "domain": "biology.stackexchange", "id": 5419, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "biochemistry, lab-techniques, biophysics, biotechnology, gel-electrophoresis", "url": null }
neural-networks, gradient-descent In the 2nd step, the algorithm computes the error for a sample and backpropogates it through the layers. This happens for all of the training samples (please correct me if I am wrong because this is what I assume is going on). Then in the 3rd step, the weights and biases are updated. My question is, why does the algorithm wait until the third step to update the weights and biases. That is, why can't it do it after each training sample instead of after a whole set of training samples? Thank you so much for your help and I appreciate it. You are right. While you could backpropagate for all samples and then update the weights, you don't have to. Alternatively, you can iterate through the samples and, for each sample, backpropagate for just that sample and then update the weights.
{ "domain": "cs.stackexchange", "id": 7119, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, gradient-descent", "url": null }
computer-vision, linear-algebra, projective-transformations The projective space $\mathbb{P}^2$ $\mathbb{P}^2$ is the projective space of $\mathbb{R}^2$, so it is $\mathbb{R}^2$ augmented with lines and points at infinity. All points and lines of $\mathbb{P}^2$ actually belong to $\mathbb{R}^3$, i.e. they are vectors of three components, because they are homogenous representations of the counterparts in $\mathbb{R}^2$. To emphasize, in $\mathbb{P}^2$, both points and lines can be represented by a vector in $\mathbb{R}^3$, which is the homogenous representation of the counterpart vector in $\mathbb{R}^2$ (if it exists, e.g. points at infinity do not exist in $\mathbb{R}^2$). What is a homography? A homography (aka projectivity, collineation or projective transformation) is an invertible map $h$ from the projective space $\mathbb{P}^2$ to itself, $$h: \mathbb{P}^2 \rightarrow \mathbb{P}^2,$$ such that $\mathbf{x}_1, \mathbf{x}_2, \mathbf{x}_3$ lie on the same straight-line if and only if $h(\mathbf{x}_1), h(\mathbf{x}_2), h(\mathbf{x}_3)$ do.
{ "domain": "ai.stackexchange", "id": 1961, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-vision, linear-algebra, projective-transformations", "url": null }
As a side note, L'Hôpital is essentially doing all this expansion and cancelling for us by the machinery of differentiation. In particular, if $$f(x) = Ax^2 + o(x^2)$$, then $$\frac{f(x)}{x^2} \to A \text{ as } x \to 0$$ which we can "extract" by noting that $$f''(0) = 2A$$ so that $$\lim_{x \to 0} \frac{\frac{d^2}{dx^2} f(x)}{\frac{d^2}{dx^2} x^2} = \lim_{x \to 0} \frac{2A + o(1)}{2} = A$$ Of course, the true story is somewhat more involved (since denominators need not be $$x^k$$), but I find this a useful intuition to have. If you know about complex residues, I also like to think of this as essentially analogous to residues at higher order poles (since we're extracting a coefficient of an expansion).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.979354072876341, "lm_q1q2_score": 0.800694899669698, "lm_q2_score": 0.8175744828610095, "openwebmath_perplexity": 365.43340753465566, "openwebmath_score": 0.9999898672103882, "tags": null, "url": "https://math.stackexchange.com/questions/3643583/evaluate-lim-x-to-0-frac-sin-lefta2x-right-2-sin-leftax-right-sin" }
# find the point of convergence of sequence {$a_n$} [duplicate] Let $$\displaystyle a_n= \sum_{k=1}^{n} \frac{n}{n^2+k}$$, for $$n\in \mathbb{N}$$. Then what is the nature of sequence $$\{a_n\}_{n\in\mathbb{N}}$$. I tried using the Cauchy's general principle of converges for a sequence. But I think that this won't help me as because: $$\displaystyle a_{n+p}= \sum_{k=1}^{n+p} \frac{n+p}{{(n+p)}^2+k}$$ and $$\displaystyle a_n= \sum_{k=1}^{n} \frac{n}{n^2+k}$$ And now if I do $$a_{n+p}-a_{n}$$ then this won't even cancel a single term. $$a_1$$ will have one term. $$a_2$$ will have two terms, and so on. But here the first term in $$a_2$$ is not the term of $$a_1$$. and due to this problem I was unable to use any results of convergence of series of positive terms. Any help/hint will be appreciated.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471613889294, "lm_q1q2_score": 0.8177177345160853, "lm_q2_score": 0.831143054132195, "openwebmath_perplexity": 1568.7552325477527, "openwebmath_score": 0.5558695197105408, "tags": null, "url": "https://math.stackexchange.com/questions/3067150/find-the-point-of-convergence-of-sequence-a-n" }
classical-mechanics, resource-recommendations, definition, laws-of-physics force shifts over time. In another context these points would repay detailed anal­ysis, for the nature of the commitment to a law is very different from that of commitment to a definition. Laws are often corrigible piecemeal, but definitions, being tautologies, are not. For example, part of what the acceptance of Ohm's Law demanded was a redefinition of both 'current' and 'resistance'; if those terms had continued to mean what they had meant before, Ohm's Law could not have been right; that is why it was so strenuously opposed as, say, the Joule-Lenz Law was not.
{ "domain": "physics.stackexchange", "id": 12220, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, resource-recommendations, definition, laws-of-physics", "url": null }
So the sum $a_{14} + a_{23} + a_{32} + a_{41}$ is $\displaystyle \sum_{\ell=1}^4 a_{\ell,\,5-\ell}.$ Let us contrast that with the situation where you start with $0$ rather than with $1.$ $$\begin{array}{c|ccccccccccc} & 0 & 1 & 2 & 3 & 4 & 5 & \longrightarrow i \\ \hline 0 & & & & & a_{04} \\ 1 & & & & a_{13} \\ 2 & & & a_{22} \\ 3 & & a_{31} \\ 4 & a_{40} \\ 5 \\ \downarrow \\ j \end{array}$$ Here, in each case, the sum of the two indices is $4\text{:} \quad 0+4,\quad 1+3, \quad 2+2, \quad 3+1, \quad 4+0.$ So you have $\displaystyle \sum_{\ell=0}^4 a_{\ell,\,4-\ell}.$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303437461132, "lm_q1q2_score": 0.8205087772193385, "lm_q2_score": 0.8289387998695209, "openwebmath_perplexity": 341.58750713353925, "openwebmath_score": 0.916387140750885, "tags": null, "url": "https://math.stackexchange.com/questions/2486242/cauchy-product-starting-from-1" }
c++, opengl states.push_back(_States {}); states.back().state = e_pass.state; auto& state = states.back(); state.programs.push_back(_Programs {}); state.programs.back().program = e_pass.program; auto& program = state.programs.back(); program.meshs.push_back(_Meshs {}); program.meshs.back().mesh = e_mesh; auto& mesh = program.meshs.back(); mesh.uniforms.push_back(_Uniforms {}); mesh.uniforms.back().textures = e_pass.textures; mesh.uniforms.back().vec2 = e_pass.vec2; mesh.uniforms.back().entity = e; }
{ "domain": "codereview.stackexchange", "id": 9266, "lm_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++, opengl", "url": null }
gazebo Originally posted by mbj on ROS Answers with karma: 197 on 2011-03-16 Post score: 0 The answer wasn't the correct because I didn't apply a correct contact propierties of the wheel (friction coefficients, contact stiffnes and contact damping, explained here and here). When this was solved, the answer was the expected. Although this, I only obtain correct responses when the duration time was -1 (infinite). When I set the duration_time or start_time to any positive valor (like 50) Gazebo worked as if it had been set to infinity. Originally posted by mbj with karma: 197 on 2011-03-23 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 5085, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
java, algorithm, tree, pathfinding, breadth-first-search /** * This class holds the actual satellite datum and possible links to child * tree nodes. This inner static class is declared public so that other * algorithms can work on them. * * @param <E> the type of the satellite datum. */ public static final class BinaryTreeNode<E extends Comparable<? super E>> extends AbstractBinaryTreeNode<E, BinaryTreeNode<E>> { /** * Construct a new tree node with given element. * * @param element the element to store in this tree node. */ BinaryTreeNode(final E element) { super(element); } /** * Returns the satellite datum of this tree node. * * @return the satellite datum. */ public E getElement() { return element; } } /** * The root node of this tree. */ private BinaryTreeNode<E> root;
{ "domain": "codereview.stackexchange", "id": 13497, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, tree, pathfinding, breadth-first-search", "url": null }
c++, beginner, parsing, stream, overloading Deciding whether your std::transform lowercasing should be removed, kept, or folded into the helper function vector_contains (renaming that function to indicate its new purpose, and using a non-mutating facility such as strcasecmp) is left as an exercise for the reader.
{ "domain": "codereview.stackexchange", "id": 33978, "lm_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, parsing, stream, overloading", "url": null }
• @themathandlanguagetutor Also sorry if I sounded rude. You are definitely on the right track. I am not sure if your formula works for $t=1$. Of course there might be better solutions to this problem (especially ones with an easier final proof that they are Cauchy), I just wanted to point ot the "pointy end" intuition. And your initial idea might still work. – M. Winter Nov 10 '17 at 23:27
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668728630677, "lm_q1q2_score": 0.8359078628460244, "lm_q2_score": 0.8519527982093666, "openwebmath_perplexity": 197.62580228984962, "openwebmath_score": 0.9411797523498535, "tags": null, "url": "https://math.stackexchange.com/questions/2513354/cauchy-sequence-of-smooth-parameterized-curves-that-does-not-converge" }
go, graphics I suspect that if you just process the whole lot in a single routine, with a simple slice, that things will be a whole lot faster.... and simpler. So, turn q in to a make([]OrderedPair, 0, length) (a slice with capactiy for possibly everything), and then append flood-candidates to that. Your seen map should also possibly be a map[OrderedPair]bool instead of map[OrderedPair]struct{}. It makes the logic easier later... instead of:
{ "domain": "codereview.stackexchange", "id": 19128, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "go, graphics", "url": null }
electromagnetism, nuclear-physics, coulombs-law, binding-energy, strong-force Title: What makes a nucleus unstable? My question is simply that - what makes a nucleus unstable? What exactly causes a nucleus to start breaking apart in the first place? Is it the Coulomb force between the neighboring protons? I'm just curious. It is instructive to look at chart of isotopes ,
{ "domain": "physics.stackexchange", "id": 17956, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, nuclear-physics, coulombs-law, binding-energy, strong-force", "url": null }
glaciology, glacier, ice Ice can be approximated by a density of 900 kg/m3, firn has a density of about 600 kg/m3 but it must be remembered that the firn is converted to glacier ice by metamorphic processes so that the density changes with depth from 600 to 900 kg/m3. the transition to ice occurs at depths of about 30 m in temperate glaciers although few studies exist on the actual processes that occur. Snow have very differing densities but considering averages, I would say that it would vary between 350 to maybe 500 kg/m3 for winter (cold) conditions and around 550 kg/m3 for a melting snow pack. Super-imposed ice is closer to ice and probably varies in the upper range of 800--900 kg/m3.
{ "domain": "earthscience.stackexchange", "id": 385, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "glaciology, glacier, ice", "url": null }
electromagnetism, visible-light Title: How is light produced? To be clear here, My question arises from studying Electromagnetic induction and polarisation and photoelectric effect. From here I've gained the knowledge that creation of a photon involves: Electromagnetic Induction - The fact that a time varying spatial magnetic field which creates a closed loop electric field [Super Confusing as to why universe does that] Polarisation - In the books, they show that light is oscillating electric field vectors and magnetic field vectors Photoelectric Effect - Creation of light has something to do with an electron returning to a lower energy state, not saying that it's the only way. So how does light get produced? I'm seeking in-depth explanation.
{ "domain": "physics.stackexchange", "id": 77435, "lm_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, visible-light", "url": null }
formal-languages, regular-languages, finite-automata So, if I understand this correctly, the DFA is checking all the possible strings on the input alphabet for the last $n$ characters.
{ "domain": "cs.stackexchange", "id": 1706, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, regular-languages, finite-automata", "url": null }
java, algorithm, tree, validation, groovy I have already made lots of optimizations, at least compared to how bad it was before using only Lists instead of Maps and Sets, but I was wondering if there would be a more efficient solution to this problem. I wondered if a Java TreeMap would be appropriate somewhere here, but could not figure out how it could improve performance. Using TreeMap? You have a tree represented in a HashMap, which is completely fine. A TreeMap has a specific tree structure based on comparable. I don't think the hierarchy of the employees can be expressed with a suitable comparable. Variable names Meaningful variable names are good. In this case, the operation of findInvalidUserRelationships is purely mathematical (finding cycles in a graph, checking whether the height of a tree exceeds 50) and I find it easier to understand the method using more math related names. It might also be more readable here to use map.each { k, v -> println("key: $k, value: $v") }
{ "domain": "codereview.stackexchange", "id": 44565, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, tree, validation, groovy", "url": null }
beginner, haskell, tic-tac-toe Title: TicTacToe in Haskell Are there any ways which I could improve and simplify this code? Is my code idiomatic Haskell? Is the use of a lens library to change an element of a two-dimensional array unnecessary? If so, how could I replace it with a more elegant and simpler solution? Do I need to make use of more types in order to make my code more understandable? As a Haskell beginner, I am still trying to get used to the functional programming way and would appreciate it if answerers would provide a detailed and easy-to-understand answer (as well as references to materials which I could look up to learn more). -- Tic Tac Toe implementation in Haskell. module TicTacToe ( newGame, isWin, move ) where import Control.Lens import Data.List import Data.Maybe -- Size of the grid n :: Int n = 3 data Player = X | O deriving (Show, Read, Eq) type Marking = Maybe Player type Position = (Int, Int) type Grid = [[Marking]]
{ "domain": "codereview.stackexchange", "id": 10453, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, haskell, tic-tac-toe", "url": null }
infinite-impulse-response, z-transform where a, b, and c would be replaced by their numeric values or if you're competent in the symbolic math capability, you could instead obtain a pure symbolic result for the coeffients $d_k$, which would therefore give you a way to compute LCCDE coefficients from pole-zero products of $H(z)$ in a rather roundabout way. Finally, the computations for a power of $z^{-1}$ products is basicly the same if you describe the product as $$P(z) = (1 - az^{-1})(1-bz^{-1})(1-cz^{-1})$$ and, $$P(z) = d_0 + d_1 z^{-1} + d_2 z^{-2} + d_3 z^{-3} $$ where again $$d[k] = (1 -a)\star(1 -b)\star(1-c)$$
{ "domain": "dsp.stackexchange", "id": 3847, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "infinite-impulse-response, z-transform", "url": null }
pavement Currently, the software calculates the total transverse cracking which a function of the reflected transverse cracking from the existing pavement and the thermal/transverse cracking from the new overlay layer. Therefore, the standard deviation equation in the software is now based on the total thermal/transverse cracking value instead.
{ "domain": "engineering.stackexchange", "id": 2961, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pavement", "url": null }
### Vector Transposes And The Dot Product In linear algebra vectors are implicitly column vectors. I.e., when we talk about we mean: Thus, the transpose of is a row vector: We can then do vector multiplication of the two like so: So, in general . ### Dot Product With Matrix Vector Product If is an mxn matrix and then . Then, if then is also well defined and: Thus we can say . ### Unit Length Vectors A unit vector is a vector that has a length of 1. If is a vector (notice the special symbol used) then we defined its length as: Thus if a vector is a unit vector then . Interesting we can also write . To construct a unit vector where , we need the sum to also be 1! How do we achieve this if ? We do the following: ### Orthogonal Vectors and Linear Independence Figure 1
{ "domain": "jehtech.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9893474904166246, "lm_q1q2_score": 0.8111594186493482, "lm_q2_score": 0.8198933403143929, "openwebmath_perplexity": 293.740094673211, "openwebmath_score": 0.9159740209579468, "tags": null, "url": "https://jehtech.com/mathsy_stuff/linear_alg.html" }
optics, electromagnetic-radiation, refraction, geometric-optics We need to make some notes first. In the video, Don Lincoln is considering the case of $p$-polarized light coming to the air-glass interface. In $p$-polarized light, the $B$-field is parallel to the surface of the interface. One can use Maxwell's equations to show that the components of the $E$- and $B$-fields that are parallel to the surface must be the same in the limit $z\rightarrow 0+$ from above and in the limit $z\rightarrow 0-$ from below where $z=0$ is the level of the surface. Since in the case of $p$-polarized light we have that $\vec{B}(x, y, z, t)$ is parallel to the surface at all $(x, y, z, t)$, our proof will demonstrate that $\vec{B}_{\text{air}}(z\rightarrow 0+) = \vec{B}_{\text{glass}}(z\rightarrow 0-)$. To show our claim, we will use Ampere's law. At the air-glass interface, consider a rectangular loop $C$ of height $h$ and length $\ell$ half-way between the the two media as depicted below.
{ "domain": "physics.stackexchange", "id": 85272, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, electromagnetic-radiation, refraction, geometric-optics", "url": null }
torque Title: How much torque is needed? If we wanted to open gate with maximum force that man can apply at distance of 1m from pivoted joint. So I want torque to determine motor and gearbox that can be used to automate gate. The maximum push force for an adult male, is 818N according to NASA - https://msis.jsc.nasa.gov/sections/section04.htm#Figure%204.9.3-6 Applying this at a distance of 1m from the pivot, corresponds to a torque of: $$T=F*d=818\text{ N} * 1\text{ m}=818\text{ Nm}$$ This is likely much more torque than is required to automate the gate, however - your calculations should be based on the mass and shape of the gate, and any speed requirements for opening time and/or acceleration, rather than on the force of a human.
{ "domain": "engineering.stackexchange", "id": 2601, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "torque", "url": null }
oT nd the coordinates of a point in the polar coordinate system, consider Figure 1. Spherical coordinates system (or Spherical polar coordinates) are very convenient in those problems of physics where there no preferred direction and the force in the problem is spherically symmetrical for example Coulomb's Law due to point. Example contributed by Armin Moser. Thus, in this coordinate system, the position of a point will be given by the ordered. Professional Publications, Inc. De nition (polar coordinate system). State three other pairs of polar coordinates for each point where —2m < 9 < 2m. A point P in the plane, has polar coordinates (r; ), where r is the distance of the point from the origin and is the angle that the ray jOPjmakes with the positive x-axis. The area of a region in polar coordinates defined by the equation $$r=f(θ)$$ with $$α≤θ≤β$$ is given by the integral $$A=\dfrac{1}{2}\int ^β_α[f(θ)]^2dθ$$. b) In the rotated system of Cartesian coordinates (X r, Y r) the X r-axis
{ "domain": "quilianobike.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9923043516836919, "lm_q1q2_score": 0.863897468000418, "lm_q2_score": 0.8705972784807408, "openwebmath_perplexity": 630.570451027436, "openwebmath_score": 0.9171416759490967, "tags": null, "url": "http://cztg.quilianobike.it/polar-coordinates-pdf.html" }
graphs, optimization, combinatorics Title: Min weighted edge cover - is the greedy algorithm sub-optimal? The post here: Solving the min edge cover using the maximum matching algorithm provides a way to obtain the min edge cover from a maximum matching by greedily adding edges on top of the maximum matching until all vertices are covered. Now, thinking about the min-weighted edge cover problem, it would seem this approach can be extended. First, find the minimum weighted matching with maximum edges, and then add edges of the smallest weight greedily, smallest weight ones first.
{ "domain": "cs.stackexchange", "id": 17293, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graphs, optimization, combinatorics", "url": null }
electromagnetism, gauge-theory, lorentz-symmetry, gauge-invariance, gauge So both actions leave the physics ($\mathbf{E}$) unchanged. Are they two sides or the same coin? Lorentz transformations and electromagnetic gauge transformations are completely different things. The former changes the observer, the latter has no physical meaning because it corresponds to superfluous degrees of freedom. The former acts on all spacetime tensors, the latter only on electromagnetic quantities. But that's not the main issue here - your argument for why they "appear" the same doesn't work to begin with: There is no such thing as a "gauge where $\vec A = 0$.". A gauge transformation acts on the four-vector $A$ with a smooth function $f$ as $$ A\mapsto A + \mathrm{d}f,$$
{ "domain": "physics.stackexchange", "id": 90277, "lm_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, gauge-theory, lorentz-symmetry, gauge-invariance, gauge", "url": null }
ros, orocos [ rosmake ] Expanded args ['rtt'] to: ['rtt'] [ rosmake ] Checking rosdeps compliance for packages rtt. This may take a few seconds. [ rosmake ] rosdep check passed all system dependencies in packages [rosmake-0] Starting >>> rosbuild [ make ] [rosmake-0] Finished <<< rosbuild ROS_NOBUILD in package rosbuild No Makefile in package rosbuild
{ "domain": "robotics.stackexchange", "id": 4812, "lm_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, orocos", "url": null }
organic-chemistry, stereochemistry, reference-request For example, take a rubber band. No matter how you bend, twist, fold or tie the rubber band, it's still topologically the same. (That's part of the definition of "topology".) However, if you cut the rubber band, pass it through itself and reattach it, you can get something that's called a trefoil knot. If you look locally at the rubber band, all the connectivity is the same. There isn't any twists in the trefoil that couldn't also be present in the original circular band form. But on a global scale the trefoil and the band are very different. There's no way you can bend, fold, twist, tie, etc. the two to interconvert them without cutting. Because of this, we say the trefoil and the circular band are topologically distinct, in a way the circular band and a twisted form of a circular band aren't.
{ "domain": "chemistry.stackexchange", "id": 8186, "lm_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, stereochemistry, reference-request", "url": null }
c#, meta-programming, roslyn if (!paramNames.All(n => xmlParamNodeNames.Contains(n))) { context.ReportDiagnostic(Diagnostic.Create(Rule, method.Identifier.GetLocation())); } } First, I get the MethodDeclarationSyntax node, then get the doc nodes for that method. If a doc node exists, I get the list of method parameter names and the list of parameter names in the XML doc. If not all method parameter names are in the XML doc parameter list, I report a diagnostic. What I am more bothered about is the code fix: private Task<Solution> RemoveXmlParameterNode(Document document, SyntaxNode root, MethodDeclarationSyntax method) { var docComment = method.GetLeadingTrivia() .Where(n => n.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia)) .Select(t => t.GetStructure()) .OfType<DocumentationCommentTriviaSyntax>() .First();
{ "domain": "codereview.stackexchange", "id": 17777, "lm_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#, meta-programming, roslyn", "url": null }
python, performance, python-3.x In addition to above, if parse one line at a time, it will save you a lot of memory if files are really huge (see also point 4. below). def getSelectMySql(log_lines_provider): # log_lines_provider is a generator that would yield one line at a time. for line in log_lines_provider: yield extract_line_details(line) Code style Overall, I think code is not easily readable. I had to read it a few times to get a feeling of what you are trying to do.
{ "domain": "codereview.stackexchange", "id": 35001, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-3.x", "url": null }
c++, multithreading, c++14, thread-safety, lock-free My underlying ideas: reads of the available elements through operator[](int) are carried out lock-free. a std::deque is used as the underlying container because it does not invalidate concurrent reads when doing a push-back (--in contrast, a std::vector could as it potentially does a reallocation) the push_back is forwarded to the underlying deque, on which it is applied in an atomic way through locking the std::mutex. Thereafter, the variable deq_size of type std::atomic<int> variable is adjusted using release semantics (so that the previous push_back is not reordered after the fetch_add). if there are reads occurring in between adding an element to the deque and the adjustment of the size, they have have to get along with a smaller size(), i.e. as if the array had not been updated. Calling operator[size()] therefore does not need to be undefined behvaiour as it is for std::deque (but that's more an inconsistency than a feature). Questions:
{ "domain": "codereview.stackexchange", "id": 26732, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, multithreading, c++14, thread-safety, lock-free", "url": null }
vectors, harmonic-oscillator for $\lambda =1$. The Helmholtz equation, in turn, is the eigenvalue/eigenvector problem for the Laplace operator $\nabla^2$ and your equation is the one defining the eigenvector with eigenvalue $1$. It may appear in a variety of contexts. One example is if you take the wave equation $$-\partial_t^2\Psi+\nabla^2\Psi=0$$ and apply separation of variables with $\Psi(t,\mathbf{x})=T(t)f(\mathbf{x})$. In this case you'll get $$\frac{T''(t)}{T(t)}=\frac{\nabla^2f(\mathbf{x})}{f(\mathbf{x})}\Longrightarrow\begin{cases}T''(t)&=&\lambda T(t),\\\nabla^2f(\mathbf{x})&=&\lambda f(\mathbf{x})\end{cases}$$ for some constant $\lambda$. As you see the spatial part of the separable solutions obeys a Helmholtz equation. Of course the general solution would be a superposition of many such separable solutions. For more examples check the Wikipedia page on the Helmholtz equation. As for the kinds of solution you can expect recall that the equation $$f''(x)=\lambda f(x)$$
{ "domain": "physics.stackexchange", "id": 63397, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vectors, harmonic-oscillator", "url": null }