text
stringlengths
1
1.11k
source
dict
optics, waves, lenses medium of the lens. If the light would be incident exactly at $\Delta_0$ there would only be travel in the lens medium, but in all other situations part of the light path will be in the vacuum and the other part will be in the lens medium. The total difference in phase is equal to the contribution caused by the part in the lens plus the contribution caused by the part in the vacuum.
{ "domain": "physics.stackexchange", "id": 42462, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, waves, lenses", "url": null }
machine-learning, deep-learning, terminology, embeddings, representation-learning Title: What is the difference between representation and embedding? As I searched about this two terms, I found they are somehow like each other, both try to create a vector from raw data as I understood. But, what is the difference of this two term? Vector representation is a generic term used to talk about any type of feature encoding, embedding vectors are instead a special case of vector representation. When talking about vector representation the only underlying assumption is that every variable was encoded into numerical values, without any restriction regarding the numbers or the vector itself.
{ "domain": "ai.stackexchange", "id": 3611, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, deep-learning, terminology, embeddings, representation-learning", "url": null }
python, opencv2 svm = cv2.SVM(training_data, responses) Originally posted by Pi Robot on ROS Answers with karma: 4046 on 2011-06-26 Post score: 1 OK, it only took me about 5 hours of trial and error to finally figure this out. Turns out the SVM class requires the training data to be of type numpy.float32. Since my training data was in regular Python arrays, I had to convert them like this: training_data = np.array(python_training_data, dtype=np.float32) responses = np.array(python_responses, dtype=np.float32) Now all is well. --patrick Originally posted by Pi Robot with karma: 4046 on 2011-06-26 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 5963, "lm_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, opencv2", "url": null }
html, css <br> <label for="favoriteColorPicker">Favorite color:</label> <input type="color" name="favoriteColor" id="favoriteColorPicker"> <br> <label for="countrySelect">Which country:</label> <select name="country" id="countrySelect"> <option>Select</option> <!-- dummy option to handle 'no selection' --> <option value="ru">Russia</option> <option value="us">United States</option> <option value="it">Italy</option> <option value="fr">France</option> <option value="au">Australia</option> </select> </fieldset>
{ "domain": "codereview.stackexchange", "id": 15923, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, css", "url": null }
renormalization, quantum-gravity Title: How do people go about looking for asymptotic safety in quantum gravity? Do we have (proposed?) methods to look for fixed points in the renormalization group flow of the Einstein-Hilbert action? My understanding of the RG is still somewhat sketchy at this point and I am having trouble understanding how one would go about searching for a fixed point in a theory that's non-renormalizable. Here are two papers on the subject: https://arxiv.org/abs/0805.2909 Investigating the Ultraviolet Properties of Gravity with a Wilsonian Renormalization Group Equation From the abstract:
{ "domain": "physics.stackexchange", "id": 29111, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "renormalization, quantum-gravity", "url": null }
homework-and-exercises, kinematics, momentum, coordinate-systems Title: Momentum in Cylindrical coordinates Given a curve $r(t) = \left(\begin{array}{c}x\\y\\z\end{array}\right)$. Respectively writing it in cylindric coordinates $r(t) = \left(\begin{array}{c}\rho\,\cos(\varphi)\\\rho\,\sin(\varphi)\\z\end{array}\right)$ Now what's the momentum? Is it really that ease to state $p = m\,\dot{r}$ thus $p = m\,\left(\begin{array}{c}\dot{\rho}\,\cos(\varphi)-\rho\,\dot{\varphi}\,\sin(\varphi) \\\dot{\rho}\,\sin(\varphi)+\rho\,\dot{\varphi}\,\cos(\varphi)\\1\end{array}\right)$ ? Something feels wrong about it. Looks right except that the third coordinate should be $\dot{z}$.
{ "domain": "physics.stackexchange", "id": 83360, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, kinematics, momentum, coordinate-systems", "url": null }
==> 0.12 seconds
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.968381236381426, "lm_q1q2_score": 0.821156068129799, "lm_q2_score": 0.8479677602988602, "openwebmath_perplexity": 883.7271907513503, "openwebmath_score": 0.5120924711227417, "tags": null, "url": "https://mathematica.stackexchange.com/questions/188236/slow-plotting-of-a-piecewise-function" }
ordinary differential equations. We use the idea of the Generalized matric space to develop necessary and sufficient conditions for uniqueness of positive solutions of the system. (2015a, b), Suo et al. In this paper, an adaptive mesh selection strategy is presented for solving a weakly coupled system of singularly perturbed delay differential equations of convection-diffusion type using second order central finite difference scheme. of second order ordinary differential equations to higher-order ODE's and systems of nonlinear differential equations and obtained solutions by using modified ADM in Hosseini et al. How do I create and solve a system of N coupled differential equations? Follow 10 views (last 30 days) Show older comments. Solve a System of Ordinary Differential Equations Description Solve a system of ordinary differential equations (ODEs). (b) Determine the specific solution that satisfies the initial conditions (0) = -2, y(0) = 1. substituting in the cyclotron frequency
{ "domain": "mantovan-knab.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.987568348780928, "lm_q1q2_score": 0.8186337322611165, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 389.25858552257097, "openwebmath_score": 0.5333122611045837, "tags": null, "url": "http://mantovan-knab.de/coupled-system-of-differential-equations.html" }
performance, vba, iteration A = A + t1 * Cos(t2) + t3 * Cos(t4) B = B + t1 * Sin(t2) + t3 * Sin(t4) t5 = (AmplCo(FileCounter-1, AktBeam,l,k)^2 + AmplCr(FileCounter-1, AktBeam,l,k)^2) t6 = (AmplCo(FileCounter, AktBeam,l,k)^2 + AmplCr(FileCounter, AktBeam,l,k)^2) C = C + t5 D = D + t6 BT_Worst = BT_Worst + t5 / t6 This halves the number of array accesses in your code (so best case you can get double speed). As I've written already, there are limitations in VBA too. Further improvement could be done implementing your code in e.g. Visual Studio and compile as an Excel add-in. (That case you could avoid run time compilation and debugging which are the biggest issue in VBA).
{ "domain": "codereview.stackexchange", "id": 22492, "lm_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, iteration", "url": null }
ros, python2.7, ros-service Original comments Comment by Astronaut on 2022-03-14: Ok yes good point. I was not sure about it. Thanks. So the last two lines of code will do right? No need anything else? how about from ros_services.srv import RosService,ImuResponse how to define the ros_services.srv file? Comment by miura on 2022-03-14: I am glad to see that progress has been made. I would like you to share what problems you are experiencing. Otherwise, it is difficult to guess what the problem is and what needs to be fixed. For a definition of services, please refer to the following tutorial to get started. http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv#Creating_a_srv Comment by Astronaut on 2022-03-18: i read the tutorial but stiill when create the sercer and client node is not working . I post it separately the question witth the whole code. Please can you help? here the link link text Comment by miura on 2022-03-20: I have just checked your question.
{ "domain": "robotics.stackexchange", "id": 37497, "lm_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, python2.7, ros-service", "url": null }
json, typescript, angular-2+ This is sample code on one service. Now this has been followed in all services to handle data and error. When I run gulp cpd command to detect the duplicate code, it lists down all the files. Is there a way to handle this without duplicating? Create one httpservice and extend it in your service, for example: HttpService: export class HttpService { protected userInfo:IUserModel; constructor(public http: Http, public user: User) { this.userInfo = this.user.getInfo(); } /** * method http get * @param url * @param params * @returns {Http} */ fetch(url, params, addData) { let headers = new Headers(); headers.append('Content-Type', 'application/json'); headers.append('User-Id', this.userInfo.id); headers.append('Token', this.userInfo.accessToken); if(addData.accessType) { headers.append('Access-Type', '1'); }
{ "domain": "codereview.stackexchange", "id": 27701, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "json, typescript, angular-2+", "url": null }
The Divergence Theorem is sometimes called Gauss' Theorem after the great German mathematician Karl. along the unit square 0 < < 1, 0 < y < 1 on the plane z — (c Osk. 1) and show that they are equal. Example: 4D divergence theorem. Evaluate ZZ S → F · →n dS, where → F = bxy2,bx2y,(x2 + y2)z2 and S is the closed surface bounding the region D consisting of the solid cylinder x2 +y2 6 a2 and 0 6 z 6 b. Some problems related to Stoke’s and Divergence theorems Math 241H 1. Remark 3 We can also write the conclusion of Green's Theorem as Z ( + )= ZZ µ − ¶ and this form is sometimes more convenient to use (as in the following ex-ample). Apply Green’s Theorem to evaluate the following integrals. The Stokes Theorem. [10 marks] Note that in spherical polar coordinates Evaluating now the flux through the flat surface at z = 0, only the z-component of F contributes. Let's now attempt to apply Stokes' theorem And so over here we have this little diagram, and we have this path that we're calling C, and
{ "domain": "saltotech.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9904405991009794, "lm_q1q2_score": 0.8253585073266065, "lm_q2_score": 0.8333245911726382, "openwebmath_perplexity": 476.73427828009363, "openwebmath_score": 0.9027653932571411, "tags": null, "url": "http://saltotech.it/xmyz/verify-the-divergence-theorem-by-evaluating.html" }
Note that the roots of $x^n-a$ are $\alpha ,\alpha\zeta_n,\alpha\zeta_n^2,\ldots,\alpha\zeta_n^{n-1}$ where $\alpha$ is as you said. Then the splitting field of $x^n-a$ is $F:=\mathbb{Q}(\alpha ,\alpha\zeta_n,\ldots,\alpha\zeta_n^{n-1})$. Now $\alpha\in F$ and $\zeta_n=\alpha^{-1}(\alpha\zeta_n)\in F$, hence $\mathbb{Q(\alpha ,\zeta_n})\subseteq F$. Now $\alpha\zeta_n^i\in \mathbb{Q}(\alpha ,\alpha\zeta_n)$ for each $i$, hence $F\subseteq \mathbb{Q}(\alpha ,\alpha\zeta_n)$. Therefore $F=\mathbb{Q}(\alpha ,\alpha\zeta_n).$ - Note that $(\alpha\zeta_n^k)^n = \alpha^n\zeta_n^{nk}=\alpha^n=a$, $0\le k<n$. - 1. Assuming that by $\zeta_5$ you mean the fifth primitive root of unity, the roots of $x^5-2$ are simply $\sqrt[5]{2}, \sqrt[5]{2} \zeta_5, \sqrt[5]{2} \zeta_5^2, \sqrt[5]{2} \zeta_5^3, \sqrt[5]{2} \zeta_5^4$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693242009478238, "lm_q1q2_score": 0.8035104500589539, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 87.27642176511308, "openwebmath_score": 0.9822936654090881, "tags": null, "url": "http://math.stackexchange.com/questions/268676/question-on-determining-the-splitting-field" }
physical-chemistry, atoms, atomic-structure, atomic-radius $$\langle r\rangle_{3,\,0}= \frac{27 a_0}{2 Z}$$ $$\langle r\rangle_{3,\,1}= \frac{25 a_0}{2 Z}$$ $$\langle r\rangle_{3,\,2}= \frac{21 a_0}{2 Z}$$ $$\langle r^2\rangle_{3,\,0}= \frac{207 a_0^2}{Z^2}$$ $$\langle r^2\rangle_{3,\,1}= \frac{180 a_0^2}{Z^2}$$ $$\langle r^2\rangle_{3,\,2}= \frac{126 a_0^2}{Z^2}$$ You can see that, as the azimuthal quantum number (l) increases, the electron's average distance from the nucleus decreases. Note, however, that in hydrogen (or any single-electron atom, such as $\ce{He^+}$ or $\ce{Li^{2+}}$, etc.), all orbitals in the same shell have the same energy. Thus the energies of the 3s, 3p, and 3d orbitals are identical. As a consequence, a hydrogen electron excited to the third energy level is actually in a weighted linear combination of all of these orbitals, and its actual average distance would likewise be a weighted average of these.
{ "domain": "chemistry.stackexchange", "id": 14141, "lm_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, atoms, atomic-structure, atomic-radius", "url": null }
vba, excel .Cells(1, 2).Resize(UBound(strLines2Transposed)) = strLines2Transposed For Loop2 = LBound(strLines) To UBound(strLines) If strLines(Loop2) <> strLines2(Loop2) Then .Cells(Loop2 + 1, 1).EntireRow.Interior.ColorIndex = 6 Next Loop2 End With
{ "domain": "codereview.stackexchange", "id": 24551, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
catkin If I search for the hardcoded CI path /builds/k.lekkerkerker/catkin_ws in the build and devel folders I get thousands of matches. And from these commands I find that there are also matches on binary level: grep -HIrn "/builds/k.lekkerkerker/catkin_ws" > /tmp/file1 grep -Hrn "/builds/k.lekkerkerker/catkin_ws" > /tmp/file2 diff /tmp/file1 /tmp/file2
{ "domain": "robotics.stackexchange", "id": 23326, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin", "url": null }
datasets, overfitting, transfer-learning, data-labelling, faster-r-cnn In addition to label accuracy, another issue may be selection bias (that is, the model may have certain subsets of examples which it performs worse/better on, and picking which examples to include in labeling on that basis may bias future training). But if you have a pre-determined, fixed-size training set this is not really an issue if you label all of them (or a model-independent random subset). The selection bias comes not from the initial model predictions/selection, but instead the (model-independent) selection of the examples to be labeled.
{ "domain": "ai.stackexchange", "id": 3333, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "datasets, overfitting, transfer-learning, data-labelling, faster-r-cnn", "url": null }
ros, rviz, data, network Too much data being published?(when i do a rostopic echo in the vehicle, my screen would be flooded with values) WIFI connection? (i set up a bidirectional networking by exporting ROS_IP and ROS_MASTER_URI, do i have to do anything else?) RViz issues? (it freezes, turns grey when i try ) Any other things i am missing out? and possible solution for this? Originally posted by Azhar on ROS Answers with karma: 100 on 2017-03-16 Post score: 0 Original comments Comment by NEngelhard on 2017-03-17: What is your ROS_MASTER_URI and ROS_IP on both computers? Comment by Azhar on 2017-03-17: ok. A : Control station, my laptop B: mobile robot in A, export ROS_IP=<IP address of A> export ROS_MASTER_URI=http://<IP address of B>:11311/ in B (MASTER), export ROS_IP=<IP address of B> roscore I solved the issue by downloading the LIDAR MAP(.yaml ) in my laptop and run from there. Thanks people. I encountered a new problem which i will be opening a new question on.
{ "domain": "robotics.stackexchange", "id": 27337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, rviz, data, network", "url": null }
homework-and-exercises, fluid-dynamics, pressure, viscosity, bernoulli-equation of v squared, one should use the average value of $v^3$ divided by the average value of v. For laminar flow in a tube, this reduces to twice the square of the average velocity, so, if the average velocity squared is being used in the kinetic energy term, the 2 should not be included in the denominator if the flow is laminar.
{ "domain": "physics.stackexchange", "id": 31678, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, fluid-dynamics, pressure, viscosity, bernoulli-equation", "url": null }
python, python-3.x #Following code is to find image, xref, topicref tags and change href attribute to lowercase, and change .xml to dita file reference extension in href attribute. def lower_topic_references(file_path): with open(path, encoding="utf-8") as f: s = f.read() s = bs(s, "xml") refs = s.find_all("topicref") for i in refs: if "href" in i.attrs: i.attrs["href"] = i.attrs["href"].replace("xml", "dita").lower() s = str(s) with open(path, "w", encoding="utf-8") as f: f.write(s)
{ "domain": "codereview.stackexchange", "id": 38215, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x", "url": null }
• Thanks @whuber. I didn't want to say that without also having the theoretical argument for someone to follow. – SecretAgentMan Sep 13 '18 at 21:11 • I figured as much, which is why I thought the comment might be helpful. BTW, right-clicking on $\TeX$ rendered on these pages gives you a way to see the underlying markup. That's a quick and easy way to learn how a particular symbol was typeset in the question (and you can copy and paste it into your answer to save time and limit typographical errors). – whuber Sep 13 '18 at 21:14
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.978384665346564, "lm_q1q2_score": 0.8153119972095929, "lm_q2_score": 0.8333245870332531, "openwebmath_perplexity": 607.4724115383348, "openwebmath_score": 0.9310302734375, "tags": null, "url": "https://stats.stackexchange.com/questions/366806/sampling-distribution-using-normal-and-rectangular-distribution" }
python, mathematics, numerical-methods The while loop is unnecessarily ugly: while True would be preferable. I would say that it would be even better to use the loop index as a loop index with for k in itertools.count(), but actually that variable is wholly unnecessary. If find it unhelpful to initialise six variables in one line where some of them are quite complicated. On the other hand, it could be more helpful to combine some of the updates in the loop body. Perhaps the happy medium is something like a, b, t = 1, D(0.5).sqrt(), 1 p, pi = 1, 0 while True: a, b, t = (a+b)/2, (a*b).sqrt(), t - p*(a-b)**2 p, piold, pi = 2*p, pi, (a+b)**2 / t I'm not entirely convinced by if pi == piold: break Sometimes iterative approaches in finite data types oscillate around the solution rather than converging definitively. It might be more robust to track the last two or three values and, on finding a loop, return the average of the values in the loop.
{ "domain": "codereview.stackexchange", "id": 35851, "lm_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, mathematics, numerical-methods", "url": null }
c++, c++11 /* Initialize by passing a vector of all capacities the Manager should deal with Ideas : - Allow constructor to be done with any iterable container ? */ class ManageListExe { public: ManageListExe(const std::vector<Capacity> &listCap) { for(const auto cap : listCap) { listExeByCapacity[cap] = {}; } } template<typename T> void updateListExe(const Capacity cap, const T& listExecutableId) { //Add executable Id when not in list for(const auto exeId: listExecutableId) { if(listExeByCapacity[cap].find(exeId) == listExeByCapacity[cap].end()) { addExeFromCap(cap, exeId); } } //Remove from listExeByCapacity executableId which are not anymore in listExecutableId for(const auto val: listExeByCapacity[cap]) {
{ "domain": "codereview.stackexchange", "id": 39193, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11", "url": null }
homework-and-exercises, spacetime, tensor-calculus Title: Reference frame as a $(1,1)$-tensor field $R$ with $R^2=R$ In a paper about the splitting of the space-time [for reference "THE STRUCTURE OF SPACE–TIME: RELATIVITY GROUPS" (International Journal of Geometric Methods in Modern Physics Vol. 3, No. 3 (2006) 591–603)], it identifies the reference frame with a $(1,1)$-tensor field $R\in\mathcal{T}^1_1(M)$, $M$ is the space-time, and satisfying the condition $R^2=R$. For convenience, it decompose $R$ into the tensor product of a vector field $\Gamma$ and a one-form $\alpha$ $$R=\alpha \otimes \Gamma$$ and the requirement $R^2=R$ is equivalent to the condition $\alpha[\Gamma]=1$. My question is: how do I prove this last equivalence? I have no clue about how to compute $R^2$. A $(1,1)$-tensor of the form $\alpha\otimes v$ eats a vector $x$ and spits out the vector $\alpha(x) v$, where $\alpha(x)$ is just a number. If you feed the result to $\alpha\otimes v$ again, you'll get the answer you're looking for.
{ "domain": "physics.stackexchange", "id": 70827, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, spacetime, tensor-calculus", "url": null }
ros, path-planning Title: Path planning without move_base - just using aruco_tag relative pose I am trying to calculate a trajectory based on the information I have: aruco_tag relative position and orientation (relative to camera_link of my robot) I don't want to use any information from /map and my fixed_frame should be base_footprint . Is it possible to do? Path planning without using any information from /map ? Originally posted by alperenkeser on ROS Answers with karma: 3 on 2023-02-01 Post score: 0
{ "domain": "robotics.stackexchange", "id": 38253, "lm_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, path-planning", "url": null }
If $$p$$ is an odd prime number, then by the fundamental theorem of number theory, $$2\times p$$ is the unique primary decomposition of $$2p$$. Once you express a positive integer $$n$$ as it's unique primary decomposition, say $$p_1^{a_1}\dots p_k^{a_k}$$, then all the positive factors will be of the form $$p_1^{b_1}\dots p_k^{b_k}$$ where $$0\leq b_i\leq a_i$$ for each $$i$$. With this observation you should be able to answer your question. • And we have $2p=2^1p^1$, so the set of all positive divisors is $$\{ 2^{a_1}p^{a_2} \mid a_1,a_2 \in \{0,1\} \}=\{1,2,p,2p \}$$. – jskattt797 May 26 at 17:17 By the fundamental theorem of Arithmetic the only prime factors of $$2p$$ are $$2$$ and $$p$$ and so every factor must be a combination of $$2$$ and $$p$$ of which $$1,2,p$$ and $$2p$$ are the only options. That is more than sufficient and more than anyone can reasonable expect to require proof. .... But if you want to smash an ant with a sledgehammer:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471613889295, "lm_q1q2_score": 0.8530306812448276, "lm_q2_score": 0.8670357701094304, "openwebmath_perplexity": 3612.5959109399764, "openwebmath_score": 0.9995583891868591, "tags": null, "url": "https://math.stackexchange.com/questions/3692679/odd-prime-p-implies-positive-divisors-of-2p-are-1-2-p-and-2p" }
black-holes, singularities, approximations, models Galilean relativity was at odds with Maxwell's equations until Einstein argued it was the former, not the latter, that had to change. The latter's Lorentz-invariance is the only alternative this group theory argument allows for. Long story short, a special speed appears, which is infinite in Galilean physics. No prejudice ruled against this, only the empirical success of a theory instead claiming that speed would be $c:=(\mu_0\epsilon_0)^{-1/2}$. We could get around this by setting $\epsilon_0=0$ so $\rho=\epsilon_0\nabla\cdot E=0$, i.e. electric charges cannot exist, or $\mu_0=0$ so currents can't generate $\nabla\times B$, but those are also empirically untrue.
{ "domain": "physics.stackexchange", "id": 77072, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "black-holes, singularities, approximations, models", "url": null }
homework-and-exercises, mathematics, error-analysis But the bloody textbook says it is 40% and quotes the answer as $430 \pm 180\ \mathrm{N}$. I've tried some calculations with various values within the uncertainty and my result was always within 13% (or about 60 N) of 430 N, just as I would expect. Where have I got wrong? Both you and the book made a mistake, but the book's mistake is large, and an error of principle, while your mistake is just simple arithmetic. First, you should get a feel for the errors involved: the mass error and the v error is negligible, because they are of order a percent or two, while the error in the difference in x, value .8m, is .14m, as you calculated, it is about 15%. This is something you should be aware of--- when you subtract approximately equal quantities, the errors amplify, because the fractional error is what is important, and the quantity becomes smaller. In your expression,
{ "domain": "physics.stackexchange", "id": 1615, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, mathematics, error-analysis", "url": null }
newtonian-gravity, pressure, fluid-statics So the force density in the x-direction is $$ f = \frac{p_1 - p_2}{l} $$ For $l \to 0$ this goes to the derivative $\partial_x p$. The same arguments apply in the y- and z-directions. For a constant external force $\vec f = -\rho g \vec e_z$, like gravity, you can easily solve the equation (under the assumption that the fixed boundaries simply resits the pressure and that the pressure at the surface is imposed by the atmosphere above). You get: $$ p = -\rho g z + p(0). $$ (Note that the variable $z$ increases upwards).
{ "domain": "physics.stackexchange", "id": 28895, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-gravity, pressure, fluid-statics", "url": null }
slam, navigation, kinect, turtlebot, rgbd6dslam i want to use the color data and depth data in RGBDSLAM. and on the workstaion : rosrun rgbdslam rgbdslam the GUI Appear. but it always sits with blank screens in a 'waiting for image/motion' state. in the web link text i set the "subscriber_queue_size" to a high value. The situation is still the same. PS: my turtlebot laptop 32bit ubuntu 11.10. Electric workstaion desktop 64bit ubuntu 11.10 Electric Thanks in advance Originally posted by longzhixi123 on ROS Answers with karma: 78 on 2013-07-17 Post score: 0 Original comments Comment by yincanben on 2014-11-19: Have you solved this problem?I want to run rgbdslam over multiple machines.Can you give some advices? Wireless is slow, many images are therefore dropped. This leads to badly synchronized images. RGBDSLAM uses the approximate time synchronizer to pair color and depth image (and camera info). I assume that the synchronization of the respective images is too bad to find pairs. My suggestions:
{ "domain": "robotics.stackexchange", "id": 14958, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, kinect, turtlebot, rgbd6dslam", "url": null }
condensed-matter, quantum-information, black-hole-firewall Title: Are there any known continuous (non-lattice) quantum error correction codes? I come from a hep-th background, but I have noticed that quantum information is becoming increasingly common in discussions of AdS/CFT and black hole information, and so I've begun thinking about it lately. I'm heard much about the toric code and other quantum error correction codes, and I'm wondering if a continuous, non-lattice version of these codes exists. It seems certain that such a thing should exist in principle, but are there are known models, for example one based on a relativistic field theory? For one thing, toric codes (and other error-correcting codes) are really about ways to store quantum information(logical qubits) in several physical qubits, so there is not much point in asking for a continuous limit. On the other hand, if you view it as a topological quantum phase of matter, then surely there are continuous versions. For example, the topological order of the toric code can be
{ "domain": "physics.stackexchange", "id": 19690, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, quantum-information, black-hole-firewall", "url": null }
astrophysics, astronomy Why do we talk of the "weakness of gravity" rather than "the surprising charge to mass ratio of particles"? It is different though at a black hole, because spacetime curvature and tidal forces of gravity become so strong, that they can even become stronger then the strong and EM forces, even on the quantum scale. Now spaghettification is caused actually by two tidal forces. One is in the direction of the singularity and stretches, and the other one is tangential and squeezes, that is why you get spaghetti form. Thus there is a compressive force in the tangential direction that is roughly equivalent to the stretching force in the radial direction. Hence spaghetti. Spaghettification of humans near black holes
{ "domain": "physics.stackexchange", "id": 62802, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, astronomy", "url": null }
earth, distances, earth-like-planet wind as the Sun approaches the end of its life. As a result, the orbital radii of the planets would increase. The surface temperature of this future AGB Sun would be lower than the temperature of the Sun, but its luminosity would be much larger.
{ "domain": "astronomy.stackexchange", "id": 1302, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "earth, distances, earth-like-planet", "url": null }
cc.complexity-theory, counting-complexity, linear-algebra, logspace Moreover, $G'$ is acyclic, and we can explicitly define an enumeration $V'=\{w_k:k\le m\}$ such that all edges in $G'$ apart from the self-loops go from $w_k$ to $w_l$ for some $k<l$. Without loss of generality, $w_0=s'$ and $w_m=t'$. Let $M$ be the adjacency matrix of $G'$ wrt the given enumeration. Then $M$ is an upper triangular integer matrix with $1$ on the diagonal, and the number of paths of length $n$ from $s'$ to $t'$ equals the top right element of $M^n$. It is easy to see that $$M=\prod_{j=m}^1\prod_{i=0}^{j-1}E_{i,j}(M_{i,j}),$$
{ "domain": "cstheory.stackexchange", "id": 1339, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, counting-complexity, linear-algebra, logspace", "url": null }
c++, stream, raii Title: Open, write and close a file I have a small 10-liner function that writes some data to a file using an std::ofstream. I did not explicitly call .close() at the end of my function, but it failed code review with the reason that it is better to explicitly call it for style and verbosity reasons. I understand there is no harm in calling .close() explicitly, but does calling it explicitly just before a return statement indicate a lack of understanding or faith in RAII? The C++ standard says: §27.8.1.2 virtual ~ basic_filebuf (); [3] Effects: Destroys an object of class basic_filebuf<charT,traits>. Calls close(). Am I justified in my argument that calling .close() at the end of a function is redundant and/or unnecessary? bool SomeClass::saveData() { std::ofstream saveFile(m_filename); if (!saveFile.is_open()) return false; saveFile << m_member1 << std::endl; saveFile << m_member2 << std::endl;
{ "domain": "codereview.stackexchange", "id": 29869, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, stream, raii", "url": null }
newtonian-mechanics, forces A car is at rest atop a boat The boat is attached to a wall by a string Situation: The car accelerates towards the wall (in direction of string) After some time $t$ the car stops quickly Question: Why does the boat move towards the wall? Assumptions: String cannot be stretched No friction between boat and water Understanding the problem The acceleration of the car When the car is resting on the boat, we can find where their center of mass lies. If we then accelerate the car (assuming no losses), the boat is pushed in the opposite direction such that the center of mass stays in a fixed position. Note that the boat cannot be pushed away from the wall in this situation because it is tethered by a string. The stopping of the car For the car to decelerate to rest (relative to the boat) it brakes, receiving a frictional force directed away from the wall and, as given by Newton's Third Law, exerting an equal force on the boat directed towards the wall. The acceleration of the boat
{ "domain": "physics.stackexchange", "id": 44334, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces", "url": null }
mass, water, si-units, metrology, length The metre is defined as the distance light moves one second divided by 299792458. The speed of light is a universal constant that is the same for every experimental scientist in the universe, and the speed of light is easily measured interferometrically. And as we saw in the previous paragraph the second is also well defined. That makes the metre a well defined and easily measured quantity as well. The kilogram however is a bit of a thorn as it's currently defined as the weight of a specific lump of platinum. This isn't based on any constant of nature and it's not easy to measure precisely unless you can borrow the lump of platinum, which the International Bureau of Weights and Measures aren't particularly keen on.
{ "domain": "physics.stackexchange", "id": 26464, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mass, water, si-units, metrology, length", "url": null }
c++, object-oriented, database Or vector<Room*>* vec = getList(type); for (unsigned i = 0; i < vec->size(); i++) { ((*vec)[i])->setBooked(atoi(bookstatus[i][0].c_str()) == 1); } since they will be abstracted away in their own classes where the implementation can be freely changed without RoomBookingSystem knowing or caring about it. This seems like a complicated system, take your time and care when refactoring and remember to always test often. Using unit testing can greatly decrease the chance of bugs entering the system after major modifications.
{ "domain": "codereview.stackexchange", "id": 22098, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, database", "url": null }
standard-model, fermions, spinors, quarks, mesons If you see the notation $\pi^+ = u \bar{d}$ (e.g. in the Particle Data Tables), this simply means that the quark content of a charged pion is given by an up-quark (with electromagnetic charge $2/3$) and an anti down-quark (with electromagnetic charge $1/3$). In this case, you could equally well write $\pi^+ = \bar{d} u$.
{ "domain": "physics.stackexchange", "id": 100057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "standard-model, fermions, spinors, quarks, mesons", "url": null }
particle-physics, standard-model, angular-momentum, symmetry, quantum-chromodynamics Title: What maintains quark spin alignments in baryons? What maintains quark spin alignments in baryons? The $uud$ proton and $udd$ neutron are both spin 1/2, implying that two of their spin 1/2 quarks are always parallel and the other is always opposed. In contrast, the $\Delta^+$ particle (which like the proton is $uud$) and the $\Delta^0$ particle (which like the neutron is $udd$) are both spin 3/2, implying presumably that the same principle keeps their internal quark spins all parallel. What principle keeps trios of quarks aligned or anti-aligned in such specific ways? The question is "what maintains the orientation". What maintains it is simply the angular momentum conservation. If the total angular momentum has $J^2=j(j+1)\hbar^2$ for $j=1/2$ or $j=3/2$, it obviously can't change because the whole vector $\vec J$ (including its length) is conserved. An up-spin may not spontaneously change to a down-spin and there is no value in between.
{ "domain": "physics.stackexchange", "id": 5505, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, standard-model, angular-momentum, symmetry, quantum-chromodynamics", "url": null }
kinect Installing the driver Disable USB 3.0 via the BIOS (a little farther down the page) This will fix most of the problems related to Kinect not working. Originally posted by Mark Silliman with karma: 81 on 2015-03-02 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by jarvisschultz on 2015-03-04: She definitely has package conflicts, and errors related to system architecture. The posted resource is excellent, but I'd be surprised if disabling USB 3.0 would fix any issues. Comment by Mark Silliman on 2015-03-05: Thanks Jarvis. We had a newer laptop with the identical error msg. BIOS fixed it because the Kinect is incompatible with most 3.0 USBs as well as many newer 2.0 USBs which are compatible with 3.0. The trick that the BIOS does is it effectively downgrades them all so the Kinect can work.
{ "domain": "robotics.stackexchange", "id": 20843, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinect", "url": null }
turing-machines, universal-turing-machines $DTIME_{1-tape}(O(n)){\subseteq}DTIME_{2-tape}(O(n))$. It's easy to make an equivalent 2-tape TM by ignoring one tape. There is a a $O(n)$ time 1-tape TM (recognizing $\{1^n\}$) that takes $O(n)$ time for any equivalent 2-tape TM to run. $DTIME_{2-tape}(O(n)){\subseteq}DTIME_{1-tape}(O(n^2))$. This is the well-known method mentioned above, to simulate a 2-tape TM on a 1-tape TM. $DTIME_{1-tape}(O(n^2 logn)){\not\subseteq}DTIME_{2-tape}(O(n))$. Suppose every $O(n^2logn)$ time 1-tape TM ran in $O(n)$ time for some 2-tape TM. Then we would have $DTIME_{1-tape}(O(n^2logn)){\subseteq}DTIME_{2-tape}(O(n)){\subseteq}DTIME_{1-tape}(O(n^2))$ This would contradict known time hierarchy bounds for 1-tape TMs. Just an extended comment to underline how the question is (up to my knowledge) far from being solved (and easy).
{ "domain": "cstheory.stackexchange", "id": 5053, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, universal-turing-machines", "url": null }
NumPy provides a mechanism for performing mathematical operations on arrays of unequal shapes: >>> import numpy as np # a shape-(3, 4) array >>> x = np.array([[-0. , -0.1, -0.2, -0.3], ... [-0.4, -0.5, -0.6, -0.7], ... [-0.8, -0.9, -1. , -1.1]]) # a shape-(4,) array >>> y = np.array([1, 2, 3, 4]) # multiplying a shape-(4,) array with a shape-(3, 4) array # y is multiplied by each row of x >>> x * y array([[-0. , -0.2, -0.6, -1.2], [-0.4, -1. , -1.8, -2.8], [-0.8, -1.8, -3. , -4.4]]) In effect, NumPy treated y as if its contents had been broadcasted along a new dimension, such that y was a shape-(3, 4) 2D array, which makes it compatible for multiplying with x:
{ "domain": "pythonlikeyoumeanit.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985936373783223, "lm_q1q2_score": 0.8747272740523564, "lm_q2_score": 0.8872045877523147, "openwebmath_perplexity": 2337.0202310202303, "openwebmath_score": 0.5890757441520691, "tags": null, "url": "http://www.pythonlikeyoumeanit.com/Module3_IntroducingNumpy/Broadcasting.html" }
python, python-3.x, tic-tac-toe #Edit the Tic Tac Toe grid. def editGrid(grid, selectedRow, selectedColumn, player): row = grid[selectedRow - 1] #Determine which player is editing the #grid. if player == " X ": #Determine what to do based on the column selected. if selectedColumn == 1: #Check to see if a player is in the spot selected. if row[selectedColumn] == " O " or row[selectedColumn] == " X ": print("\nA player is already there.\n") else: row[selectedColumn] = player elif selectedColumn == 2: if row[selectedColumn + 1] == " O " or row[selectedColumn + 1] == " X ": print("\nA player is already there.\n") else: row[selectedColumn + 1] = player elif selectedColumn == 3: if row[selectedColumn + 2] == " O " or row[selectedColumn + 2] == " X ": print("\nA player is already there.\n") else:
{ "domain": "codereview.stackexchange", "id": 28352, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, tic-tac-toe", "url": null }
45. agent0smith Group Title If you'd like to solve a quartic of the form $\large ax^4+bx^3+cx^2+dx +e = 0$ then here you go: http://planetmath.org/QuarticFormula Or watch wolfram derive it: http://www.wolframalpha.com/input/?i=a*x%5E4%2Bb*x%5E3%2Bc*x%5E2%2Bd*x+%2Be+%3D+0 46. DLS Group Title For maxima, y=$\LARGE \frac{d^2(25x^2+5−10x)}{dx^2}<0$ 47. DLS Group Title @RnR @shubhamsrg 48. AravindG Group Title yep @DLS 49. waterineyes Group Title You are taking derivative with respect to x and I respect that too, but @mathslover I think you are writing dt instead of dx.. Right?? 50. AravindG Group Title just applying second derivative test here .. 51. AravindG Group Title what c value did you get by the way ? 52. AravindG Group Title oh 1/5 :) 53. waterineyes Group Title Hey @yahoo, Congratulations for Green.. @AravindG, Congratulations for Ambassador.. And @mathslover, Congratulations for 98 + Green.. 54. DLS Group Title congratulate me too??? 55. AravindG Group Title
{ "domain": "openstudy.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399051935107, "lm_q1q2_score": 0.8207671120575635, "lm_q2_score": 0.845942439250491, "openwebmath_perplexity": 9556.652196636393, "openwebmath_score": 0.7477222681045532, "tags": null, "url": "http://openstudy.com/updates/514ffa83e4b0ae0b658b69fc" }
organic-chemistry, reaction-mechanism, thermodynamics, halides, nucleophilic-substitution Alexander A. Tishkov, Uli Schmidhammer, Stefan Roth, Eberhard Riedle, and Herbert Mayr, "Ambident Reactivity of the Nitrite Ion Revisited," Angew. Chem. Int. Ed. 2005, 44(29), 4623 –4626 (DOI: https://doi.org/10.1002/anie.200501274). Nathan Kornblum, Robert A. Smiley, Robert K. Blackwood, and Don C. Iffland, “The Mechanism of the Reaction of Silver Nitrite with Alkyl Halides. The Contrasting Reactions of Silver and Alkali Metal Salts with Alkyl Halides. The Alkylation of Ambident Anions,” J. Am. Chem. Soc. 1955, 77(23), 6269–6280 (DOI: https://doi.org/10.1021/ja01628a064).
{ "domain": "chemistry.stackexchange", "id": 15510, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, reaction-mechanism, thermodynamics, halides, nucleophilic-substitution", "url": null }
python, knapsack-problem It is obvious exactly what is input, and what is being changed. Now with python this is mildly trickier because you have no choice but to pass-by-reference, but a simple copy operation fixes the issue: def set_max_value( values_per_unit, idx ): new_list = list( values_per_unit ) new_list[idx] = -1 return new_list Granted, this is slightly slower (because of the array copy), but unless performance is known to be an issue, I think it is better for long-term code maintenance to do the copy and have a clear input/output for your function. Sort!! In cases like this sorting is your friend. Before starting your loop take your values_per_unit and sort it. sort_indexes = reversed( [i[0] for i in sorted(enumerate(values_per_unit), key=lambda x:x[1])] ) weights = [ weights[i] for i in sort_indexes ] values = [ values[i] for i in sort_indexes ] values_per_unit = [ values_per_unit[i] for i in sort_indexes ]
{ "domain": "codereview.stackexchange", "id": 26571, "lm_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, knapsack-problem", "url": null }
c, parsing, shell if (len > stringsLength) { newStrings = realloc(strings, len); if (newStrings == NULL) { fprintf(stderr, "Cannot allocate string\n"); return false; } strings = newStrings; stringsLength = len; } memcpy(strings, cmd, len); cp = strings; /* * Keep parsing the command string as long as there are any * arguments left. */ while (*cp) { /* * Save the beginning of this argument. */ argument = cp; cpOut = cp; /* * Reset quoting and wildcarding for this argument. */ quote = '\0'; quotedWildCards = false; unquotedWildCards = false;
{ "domain": "codereview.stackexchange", "id": 19756, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, parsing, shell", "url": null }
python, turtle-graphics def queue_command(self, command): """Add a command to the buffer""" self.commands.append(command) def run_command(self, command): """Send 1 command to turtle. Big switch case handles command.""" print(f"{self.name} is trying {command}") command = command.lower() try: command = command.split(" ") if len(command) > 1: data = [convert(item) for item in command[1:]] else: data = None command = command[0] except: print(f"Error: {self.name} could not perform command {command}") return None
{ "domain": "codereview.stackexchange", "id": 36560, "lm_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, turtle-graphics", "url": null }
$x_{2} = \frac{-b - \sqrt{b^2 - 4ac}}{2a}$ and y of the first intersection(s) is: $y_{1} = a_{1} * x_{1}^2 + b_{1} * x_{1} + c_{1}$ $y_{2} = a_{2} * x_{2}^2 + b_{2} * x_{2} + c_{2}$ where X is the solution of the quadratic the two parabolas are: Looking for explanations I found this Stack overflow post that mentions the same solution: Algebraic solution for the intersection point(s) of two parabolas. I also found many online calculators (mostly written in JavaScript) that use the same technique to calculate the intersection of two parabolas (for example this calculator: http://zonalandeducation.com/mmts/intersections/intersectionOfTwoParabollas1/intersectionOfTwoParabolas1.htm). Can someone explain in simple terms why this solution holds true and what is the mathematical proof behind that?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464436075291, "lm_q1q2_score": 0.819535375411815, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 510.55675637181906, "openwebmath_score": 0.7243525385856628, "tags": null, "url": "https://math.stackexchange.com/questions/2700033/explanation-of-method-for-finding-the-intersection-of-two-parabolas" }
pytorch, gpu, torch, cuda dataset = dataset.reshape(n_batches, -1) print(dataset.shape) print(len(dataset[0][0])) def passage_to_indices(passage: str): return np.array([char2index[char] for char in passage]) class Net(nn.Module): def __init__(self, input_size, batch_size, hidden_size, num_layers): super().__init__() self.lstm = nn.LSTM(input_size, hidden_size, num_layers) self.criterion = nn.CrossEntropyLoss() self.input_size = input_size self.batch_size = batch_size self.hidden_size = hidden_size self.num_layers = num_layers def forward(self, input, hidden): # lstm should take input of size (seq_length, batch_size, input_size) # and hidden of size (num_layers, batch_size, hidden_size) out, hidden = self.lstm(input, hidden) return out, hidden
{ "domain": "datascience.stackexchange", "id": 8703, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pytorch, gpu, torch, cuda", "url": null }
c++, recursion, lambda, boost, c++20 Title: Nested std::deque and std::vector Type Test Cases for recursive_transform Template Function in C++ This is a follow-up question for A recursive_transform Template Function Implementation with std::invocable concept in C++, A recursive_transform Template Function with Execution Policy, A recursive_transform Template Function Implementation with std::invocable Concept and Execution Policy in C++, std::array and std::vector Type Arbitrary Nested Iterable Generator Functions Implementation in C++ and A Various Container Type Arbitrary Nested Iterable Generator Function Implementation in C++. Thanks to G. Sliepen's answer. In the parallel execution part, std::for_each() structure is used instead of std::back_inserter() usage. With Boost.Test tool, the transform operation for each element in nested std::deque and nested std::vector (nested level less than 16) is tested as below. The experimental implementation Nested ranges comparison
{ "domain": "codereview.stackexchange", "id": 40259, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, recursion, lambda, boost, c++20", "url": null }
java, algorithm, set Title: Number of distinct elements in an array This is my solution to find the Number of distinct elements in an array. Is there away fast way to do this? It run-time is O(N). public int DistinctNumberOfItems( int[] A ) { if (A.length == 0) return 0; if(A.length == 1) return 1; Set<Integer> set = new TreeSet<Integer>(); for (int i : A) { set.add(i); } return set.size(); } What you primarily need is a bit of code formatting, naming conventions, and best practices. Your formatting is messed up, use your IDE's auto formatting feature Method names and parameter names start with lowercase letters. Avoid one-letter variables, array is a better name. A TreeSet is sorted, but there is no need to keep the set sorted, use a HashSet instead Use array.length <= 1 for a simpler if check at the beginning. End result: public int distinctNumberOfItems(int[] array) { if (array.length <= 1) { return array.length; }
{ "domain": "codereview.stackexchange", "id": 12210, "lm_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, set", "url": null }
c++, optimization, integer Net result? Both systems use less than 16 bytes of the stack, they both use 1 register in addition to the stack, and they both have the same number of instructions. I know which one is more readable.... Of course, with the above code, if I add -O2 to the optimization, I get the assembler: movl $66, %eax ret which, as you can imagine, is fast.
{ "domain": "codereview.stackexchange", "id": 27553, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, optimization, integer", "url": null }
test is a simple test we can use to find out whether or not an alternating series converges (settles on a certain number). (You probably figured out that with this naked summation. The Alternating Series Test (Leibniz's Theorem) This test is the sufficient convergence test. The idea of hopping back and forth to a limit is basically. Rearrangements. What test to use? When you're looking at a positive series, what's the best way to determine whether it converges or diverges? This is more of an art than a science, that is, sometimes you have to try several things in order to nd the answer. Alternating Series Test 1 Alternating Series Test If the terms of the alternating series ( 1)n 1b n b1 b2 b3 n 1 where bn 0 satisfy (1) bn 1 bn for all n 1 (bn is decreasing) (2) lim n bn 0 then the series is convergent. We look at a couple of examples. 7 Alternating Series, Absolute Convergence notes by Tim Pilachowski So far, we have pretty much limited our attention to series which are positive.
{ "domain": "emporiumgalorium.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97594644290792, "lm_q1q2_score": 0.8563703479136634, "lm_q2_score": 0.8774767858797979, "openwebmath_perplexity": 830.88619511814, "openwebmath_score": 0.7549763321876526, "tags": null, "url": "http://lxlj.emporiumgalorium.de/alternating-series-test.html" }
and the output: from monte carlo simulation: P(win): 0.66706 expected # of shots: 1.33967131236 from theory: P(win): 0.666666666667 expected # of shots: 1.33333333333 • By "how many turns it will take to win" are you assuming that you win? Is this a conditional probability? Jan 31 '16 at 0:49 • I am assuming the player flipping coin1 wins. The only condition seems to be that player2 must always flip tails in order for player1 to win. Jan 31 '16 at 18:03 • Terminology note: we don't 'solve' series. "Solving" is something we do with equations. We can calculate the sum of the terms (evaluate the series, sum the sequence of terms). Often people say "sum the series" (perhaps loosely since a series is formally a sum of terms -- but not ambiguously). Jan 31 '16 at 23:12 • Thanks @Glen_b, that's a good point about "solving" series. It doesn't make much sense to say that. Feb 1 '16 at 0:17
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446502128796, "lm_q1q2_score": 0.8196390320628619, "lm_q2_score": 0.8418256412990658, "openwebmath_perplexity": 443.8554170869812, "openwebmath_score": 0.974926769733429, "tags": null, "url": "https://stats.stackexchange.com/questions/193264/combining-binomial-random-variables" }
matlab, finite-impulse-response, resampling, polyphase Edit: I suppose I should clarify that my cutoff is not right at $\frac{1}{2q}$, but my transition band/cutoff is somewhat lower so this only makes it even more stringent. The polyphase structure allows for running all the filter banks at the lower sampling rate (the input rate for interpolation, and the output rate for decimation). Regardless the fundamental operation and performance of the filter is identical to the direct approach of upsample - filter - downsample. Whatever requirements are needed for the filter in that case result in the required coefficients for that filter, and those coefficients are then used as the coefficients for the bank of filters in the polyphase approach. So if you have $N$ coefficients, the $M$ polyphase banks will each have $N/M$ coefficients, more filters but all smaller and running at the lower rate which is the efficiency provided.
{ "domain": "dsp.stackexchange", "id": 11823, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, finite-impulse-response, resampling, polyphase", "url": null }
(8) 550 Chapter 8 Applications of Eigenvalues and Eigenvectors (Optional) -[~ -~l Nonnali zing these eigenvectors, we obtai n the orthogonal matrix P- I [. - - Ji Then Ji PTA P = [~ ~l Letting x = Py , we write the transformed equation for the given conic section, Equatio n (6), as 2X'2 +8),,2 _ 16x' +32),' + 56=0 X ,2 + 4y I2 _ 8x ' + 16y'+28=0. To identify the graph of this equation, we need to translate axes, so we complete the squares, which yie lds (x' _ 4)2+ 4 (y' +2)2 +28 = 16 + (x' - 4)2 + 4(y' + 2)2 = 4 ("x,_' _ ~4),-2 + 2)2 - 4 Letting x " = x ' - 4 and )'" = y' + (y' I [6 = I. (9) + 2. we find thaI Equation (9) becomes (10) whose graph is an ellipse in standard position with respect to the x "y" -coordinate axes, as shown in Figure 8.27, where the origin of the x " y"-coordinate system is in the x 'y'-coordinate system at (4. - 2), which is (3h. h) in the xy-coordinate Y y" .t o, )+-}'--- (4. - 2) in .t'y'-coordinate sy,tcm (3.fi .
{ "domain": "silo.pub", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97737080326267, "lm_q1q2_score": 0.8080039639783043, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 4465.94787859596, "openwebmath_score": 0.8407867550849915, "tags": null, "url": "https://silo.pub/elementary-linear-algebra-with-applications-9th-edition.html" }
classical-mechanics, energy-conservation, work Title: Where does a torque-invoking force belong in work energy theorem? First of all, sorry for the poorly phrased question, simply couldn't figure out a better way to put it. So, the work energy theorem states that work done on an object is equal to the change in its kinetic energy. $W=\Delta K$ Now consider a yo-yo that is dropped from rest. Say it fell a distance h in t seconds. For the correct result we need to take the effect of T into account while calculating h, but not while calculating F. if: $$\sum F = mg$$ $$h = \frac{(g - \frac{T}{m})t^2}{2}$$ Since $$W = \Delta K = mgh = K_{rot} + K_{trans} = \frac{3}{4} m v^2$$ $$v=\frac{mg-T}{m}t$$ We find $T = mg/3$ But if: We say $\sum F = mg - T$; We find $2=3$ after cancellations.
{ "domain": "physics.stackexchange", "id": 74871, "lm_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, energy-conservation, work", "url": null }
the end behavior of y = 1−3x2 x2 +4 +∞ and.... = m, then the end behavior just a special case of slant asymptotes ( $. X2 +4, then the end behavior of f ( x ) as x increases or decreases bound! As the sign of the aspects of this function is x ∈ ( −∞, ∞ ) cases how to find end behavior of a function! And local behavior of graph is determined by the degree of the function, the! The end behavior of the aspects of this function is x ∈ ( −∞, ∞ ) is. Special case of slant asymptotes ( slope$ \ ; =0 $) the end behavior a... X approaches negative infinity there is a vertical asymptote at x = 0 to determine the.. Rises to the left and Falls to the left and Rises to the left and Rises to left. Left and Rises to the left and Falls to the left and to! And −∞ and denominator '', and it 's pretty easy or decreases without bound the end behavior of =. Places where the behavior of f ( x ) as x increases or decreases without bound consider the limit y... =0$ ) determined by the degree and the leading
{ "domain": "xacademy.pt", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692318706085, "lm_q1q2_score": 0.8262059542461945, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 484.2146184988172, "openwebmath_score": 0.7733432054519653, "tags": null, "url": "https://xacademy.pt/henning-minnesota-lyn/876325-how-to-find-end-behavior-of-a-function" }
navigation, odometry, gmapping Original comments Comment by jgdo on 2012-06-08: I have tried the calibration and it said "Multiply the 'turtlebot_node/odom_angular_scale_correction' parameter with 1.007505". What do I have to do with this value now? My robot does't have a gyro yet, so it can't mess up anything (or can it?) Comment by jgdo on 2012-06-08: How exactly did you get that map, especially the right one? As you can see in the bag file, I got pretty worse results.. Comment by allenh1 on 2012-06-08: I used gmapping. Because I have a fast computer, I changed the parameters for mapping: rosrun gmapping slam_gmapping _particles:=300 _linearUpdate:=0.01 _angularUpdate:=0.001 Comment by allenh1 on 2012-06-08: If you want me to map the whole thing, I can definitely do that for you. Just increase the size of your bag file. Do a couple loops. Comment by jgdo on 2012-06-08:
{ "domain": "robotics.stackexchange", "id": 9698, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, odometry, gmapping", "url": null }
# Polynomial Interpolation – Lagrange Representations Interpolation is widely used in mathematics and in the sciences – mathematics tends to concentrate on the theoretical side of things and the methods are then used by scientists with the confidence that what they are using works. What is interpolation? Well an example would be if you are measuring the temperature outside on a particular day then you would take the temperature at certain times and record the temperature – but what about the times in between? We can’t record everything but we might need to know what the temperature was at one of these intermediate times – this is where interpolation comes in. Interpolation is a way of “joining the dots” within (not outside) a dataset so that estimates can be made about the behaviour. This can be done in hundreds of different ways using different methods each with their pros and cons.
{ "domain": "co.uk", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9915543723101533, "lm_q1q2_score": 0.8106695399479347, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 233.14462404981873, "openwebmath_score": 0.6510798931121826, "tags": null, "url": "http://www.leedsmathstuition.co.uk/2013/07/polynomial-interpolation-lagrange-representations/" }
physical-chemistry, reaction-mechanism, free-energy --------------------Update-------------------- Based on comments I'll try to reformulate my problem to make it more clear. As I have learned, there should be no difference between the reaction product AB and the mixture of A and B with the corresponding stoichiometry (1:1). Is this valid in general or just for reactions like this (cf. my water-example in the comments)? The transformation of equation (2) (in NightWriter's answer) shows, that it is an identity of the Gibbs free energy of mixing but in terms of moles of compound AB rather than in terms of moles of mixture. If equation (1) describes the reaction (i.e. formation) of AB and equation (2) the mixing of A and B, and there is no difference between a product of reaction and the corresponding mixture of the two components to form that product, there must be some mathematical relation between equation (1) and equation (2). Furthermore, I am not certain, whether the standard-state symbol in equation (2) is correct or not.
{ "domain": "chemistry.stackexchange", "id": 11648, "lm_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, reaction-mechanism, free-energy", "url": null }
python-3.x, programming-challenge, pygame if j == len(grid)-1: return i Test I will use the 4 tests given on the website I designed a simple function to do this def test(grid, test_no,correct_answer): print(f"Test number {test_no} \nCorrect answer: {correct_answer}") print(f"Returned answer: #{check_celebrity(grid)}\n\n") Tests grid1 = [ [1, 1, 1, 0], [0, 1, 1, 0], [0, 0, 1, 0], [1, 0, 1, 1] ] test(grid1, 1, "#2") grid2 = [ [1, 1, 1, 0, 1], [0, 1, 1, 0, 1], [0, 0, 1, 0, 0], [1, 0, 0, 1, 1], [1, 0, 0, 1, 1] ] test(grid2, 2, "#None") grid3 = [ [1, 1, 1, 0, 1], [0, 1, 1, 0, 1], [0, 0, 1, 0, 0], [0, 0, 1, 0, 1], [1, 0, 1, 1, 1] ] test(grid3, 3, "#2") grid4 = [ [1, 1, 1, 0, 1], [0, 1, 1, 0, 1], [1, 0, 1, 0, 0], [0, 0, 1, 0, 1], [1, 0, 1, 1, 1] ] test(grid4, 4, "#None") Results Test number 1 Correct answer: #2 Returned answer: #2
{ "domain": "codereview.stackexchange", "id": 39800, "lm_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-3.x, programming-challenge, pygame", "url": null }
reason I loathed it when I was learning linear algebra. It's funny how unexciting they all now seem, but it's a counterexample for almost every wrong linear algebra proof I tried to give.)</p> <ul> <li><p>Only zeroes as eigenvalues, but non-zero minimal polynomial (in particular, the minimal polynomial has bigger degree than the number of eigenvalues). Probably my favorite way to state this fact: <em>the minimal polynomial is not irreducible or square-free</em>. The same thing in a fancier language: the Jordan canonical form is not diagonal. </p></li> <li><p>Not diagonalizable, even over an algebraically closed field. </p></li> <li><p>Not divisible over $\mathbb C$. There are no matrices $M$ and integers $n\ge2$ so that $M^n = \left(\begin{smallmatrix}0 &amp; 1\\ 0 &amp; 0\end{smallmatrix}\right).$ All diagonalizable and most non-diagonalizable complex matrices have $n$th roots. </p> <p>(This is because, if there was a square root, it'd have minimal polynomial <em>x<sup>4</sup></em>,
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9304582612793113, "lm_q1q2_score": 0.8067405759420389, "lm_q2_score": 0.8670357494949104, "openwebmath_perplexity": 970.2770908274482, "openwebmath_score": 0.8440715670585632, "tags": null, "url": "http://mathoverflow.net/feeds/question/16829" }
algorithms, data-structures, trees, priority-queues If $a > \lg^2 n$, we destroy the smaller priority queue and insert its items one-by-one into the larger queue. As long as insert is $o(\lg^2 n)$ amortized, this is sublinear. Insert adds an element to the smallest bucket. This increases its potential by at most $O(1)$ and increases the potential of the rest of the buckets by at most $O(\lg^2 (n+1) - \lg^2 n) = O(\lg n/n)$. Since there are $O(n/\lg^2 n)$ buckets, the total increase in potential is $O(1/\lg n)$. If the smallest bucket is large, some splitting may be required, but this is amortized free (paid for by the potential we get back). The total amortized cost of insert is thus the cost to insert it into a bucket, which is $O(\lg \lg n)$.
{ "domain": "cs.stackexchange", "id": 4294, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, data-structures, trees, priority-queues", "url": null }
organic-chemistry Title: Do Biuret test always means proteins presence in a substance? I am a student and I got this answer I cant really say for sure if I understood correctly : "A substance reacts positively to Biuret's test. ¿ Can you say with 100% accuracy that such substance is a protein? Justify" Is this correct to say that the substance is a protein? Is there a chance that the test reacts but the substance is NOT a protein? Additionally, I am being asked why we are using whole milk instead of skim milk in this test. Biuret test react with a peptide bond, so nylon can react with.( https://en.wikipedia.org/wiki/Biuret_test, https://twitter.com/jane_essex/status/921359485939134465)
{ "domain": "chemistry.stackexchange", "id": 10075, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry", "url": null }
quantum-mechanics, harmonic-oscillator, coherent-states $$ \psi(q) = \frac1{\sqrt{L \sqrt{\pi}}} e^{-\frac1{2}\left(\frac{q-q_0}{L}\right)^2} e^{i k_0 q} $$ u also get a non-zero expected value for the momentum being $$\langle \hat{p} \rangle = \hbar k_0.$$ How can u interpret this physically? Well of course you can take the Fourier transform of $\psi(q)$ to get $\psi(p)$, and you will find $\langle p\rangle=0$ but intuitively $$ \psi(q)=\frac1{\sqrt{L \sqrt{\pi}}} e^{-\frac1{2}\left(\frac{q-q_0}{L}\right)^2} $$ is solution to the time-independent Schrödinger equation (in a harmonic potential) so that $\langle x\rangle$ will be independent of $t$. You can then think that $\langle p\rangle = m\langle \dot{x}\rangle =m\frac{d}{dt}\langle x\rangle=0$. The second case, where you have shifted your Gaussian (in $p$-space) is no longer a solution to the TISE but in fact a coherent state and it's expectation values for $\langle x\rangle$ and $\langle p\rangle$ are discussed in this post.
{ "domain": "physics.stackexchange", "id": 74636, "lm_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, harmonic-oscillator, coherent-states", "url": null }
irobot-create, roomba, linux Title: Sending commands from Ubuntu I have a iRobot Create model 4400 and I need to send commands to the open interface through Ubuntu. I'm using gtkterm at 57600 baud but when I press play button, it only drives around itself. I have tried to send commands as raw data and as hexadecimal data but it doesn't work. What am I doing wrong? The Roomba expects binary data. When you type in gtkterm, you are sending ASCII data. (Unless there is a feature of gtkterm i don't know about). For example when you type "128" into the terminal, you are actually sending 3 bytes of data: [49 50 56]. And because many commands of the OI Spec are outside the typeable ASCII range, using the terminal in this manner won't work. You should use a programming language such as C, C#, Python, etc to send the data packet.
{ "domain": "robotics.stackexchange", "id": 911, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "irobot-create, roomba, linux", "url": null }
c#, bitwise, serialization, stream Here and there I see magic numbers (like 8, 63, 64, 32...). It's obvious what they represent but it's also true that any change you will make will be harder (and reader will need to think, each time, what that magic number is and why it's there). Help them and use const int fields for them: const int BitsPerByte = 8; static readonly int Int32SizeInBits = sizeof(int) * BitsPerByte; static readonly int Int64SizeInBits = sizeof(long) * BitsPerByte;
{ "domain": "codereview.stackexchange", "id": 21901, "lm_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#, bitwise, serialization, stream", "url": null }
slam, localization, navigation, hector-slam, amcl Second, is there a way to turn of mapping or map updates, since we don't need it and it wastes the computational resources? Thanks! Comment by zlg9 on 2021-08-04: I am applying the same config (https://github.com/tu-darmstadt-ros-pkg/hector_slam/blob/correct_odometry_publisher/hector_slam_launch/launch/odom_test.launch), but it doesn't create a transform between base_link and odom. So AMCL fails to catch the laser scan. It instead, creates a separate transform between odom and map. Comment by jacob_lee on 2021-11-01: hi @zlg9, It is true that hector does not publish base_link --> odom, according to gmapping roswiki, this transformation is "usually provided by the odometry system (e.g., the driver for the mobile base)". Have are u able to get amcl worked on hector if this TF is absent?
{ "domain": "robotics.stackexchange", "id": 16272, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, localization, navigation, hector-slam, amcl", "url": null }
python, beginner, gui description = d_soup except Exception,e: print e print 'unable to get description' #print description print json_data description = None # Grab Specifications try: json_data = data.split("page.init(")[1].split("});")[0] json_data = json_data + "}" print "Trying to load json" json_data = json.loads(json_data) specifications = json_data['product']['specifications'] specs ="<br>".join(x for x in specifications) except Exception,e: print e print 'unable to get specifications' print json_data #print specs specs = None
{ "domain": "codereview.stackexchange", "id": 6900, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, gui", "url": null }
ros, rosbridge, rosbridge-server I was sending a string for the time values when I should have been sending integers. This was throwing the exception of "Unknown Operation: Auth" which was throwing me off. For time values, I was sending the seconds relative to when my program started. This was wrong. I should have been sending seconds since epoch (http://en.wikipedia.org/wiki/Unix_time). Of course. I hope this is useful for people with this problem in the future. Originally posted by trianta2 with karma: 293 on 2013-11-26 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 16259, "lm_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, rosbridge, rosbridge-server", "url": null }
thermodynamics, heat-engine Title: Analyzing $T$-$S$ diagrams This is the motivation behind my question; what would the longest line therein translate into on a $p$-$V$ curve? It is evident that the horizontal line is an isothermal process and the vertical line is an adiabatic (isentropic) process. But what kind of process is represented by the third line? If you can use the perfect ideal gas model $P v = R T$, you can: write the parametric expression of the line representing the transformation in the $T-S$ plane \begin{equation} T = T_0 + \frac{T_1 - T_0}{s_1 - s_0} (s - s_0) = a + b s \ , \quad \text{or} \quad s = \alpha + \beta T \end{equation} exploit the $1^{st}$ principle of thermodynamics, $de = Tds - P dv$ the equation of the ideal gas $Pv = RT$ and the expression of the internal energy $e = c_v T$ with constant $c_v$, s.t. $de = c_v dT$
{ "domain": "physics.stackexchange", "id": 99011, "lm_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, heat-engine", "url": null }
unit-testing, salesforce-apex //create a method for for getting notes in MatrixTestFactory List<MTX_Matrix_Note__c> notes = MatrixTestFactory.getNotes(); Test.startTest(); //MTX_Matrix_Note__c nt = new MTX_Matrix_Note__c(); System.runAs(matrixUsers[0]) { MTX_MatrixService.deleteCandidateNote(notes[0]); } Test.stopTest(); } static testMethod void retrievingNoteiD{ List<User> matrixUsers = MatrixTestFactory.getMatrixUsers(); //create a method for for getting notes in MatrixTestFactory List<MTX_Matrix_Note__c> notes = MatrixTestFactory.getNotes(); Test.startTest(); //MTX_Matrix_Note__c nt = new MTX_Matrix_Note__c(); System.runAs(matrixUsers[0]) { MTX_MatrixService.deleteCandidateNote( notes[0]); } Test.stopTest(); } }
{ "domain": "codereview.stackexchange", "id": 34595, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "unit-testing, salesforce-apex", "url": null }
c#, game public void Subtract(int amount, Coins type) { if (amount <= 0) return; switch (type) { case Coins.Copper: Subtract(0, 0, 0, amount); break; case Coins.Silver: Subtract(0, 0, amount, 0); break; case Coins.Gold: Subtract(0, amount, 0, 0); break; case Coins.Platinum: Subtract(amount, 0, 0, 0); break; } } public void Subtract(MoneyBag other) { BaseDenomination -= other._baseDenomination; } public void Empty() { _baseDenomination = 0; } public void Fill() { _baseDenomination = MaximumBaseDenomination; }
{ "domain": "codereview.stackexchange", "id": 19034, "lm_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#, game", "url": null }
human-biology, molecular-biology, cell-biology, physiology, muscles Title: When muscles contract is the process similar to how non-newtonian fluids react? I'm trying to understand how muscles contraction/tension works but getting loss in on the cellular level. From my understanding, when muscle tissue need to contract, the cells are flooded with calcium? Does that mean they get filled up with calcium? If so, are the cells hollow or does the calcium replace the fluid that was originally there? Or does the calcium cause the reaction in the cell for it to firm up?
{ "domain": "biology.stackexchange", "id": 9346, "lm_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, molecular-biology, cell-biology, physiology, muscles", "url": null }
ros, battery If all you're looking for is a way to charge your batteries without having to take them off your vehicle, all you need to do is to branch off the power and ground wires from your pack, along with the balancer cable to a connector. Then you can connect that your charger. You can monitor battery voltage using a analog to digital converter on an arduino which can be running rosserial-arduino that posts the pack voltage. With this information you can have your robot handle an undervoltage condition. To keep your batteries operating normally, all you have to do is to make sure you do not discharge them past the cutoff and also use a balancer each time you charge them.
{ "domain": "robotics.stackexchange", "id": 28444, "lm_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, battery", "url": null }
inorganic-chemistry, reduction-potential Title: Standard Half-Cell Reduction Potential for Periodate to Iodine I'm looking for standard half-cell reduction potential $\ce{IO4-}$/$\ce{I2}$ in acid medium. Unfortunately I was unable to find the value in all comprehensible reference books. Hard to believe this values have not been measured or calculated so far. Here is the standard half-cell reduction potential $\ce{IO4^{−}/I2}$ in acid medium depicted using Latimer diagram. (source) Note: Here $\ce{IO4-}$ (periodate ion) gets hydrated to form orthoperiodic acid which is $\ce{HIO4.2H2O}$ or $\ce{H5IO6}$.
{ "domain": "chemistry.stackexchange", "id": 5815, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, reduction-potential", "url": null }
special-relativity, field-theory, classical-electrodynamics $$ \left\{ \begin{array}{c} \vec{E} =-\vec{\nabla}\phi - \dfrac{\partial\vec{A}}{\partial t} \\ \vec{B} = \vec{\nabla}\times\vec{A} \end{array} \right. $$ Then, $A^\mu \equiv (\phi/c, \vec{A})$ is a four-vector, i.e. it transforms from one inertial reference frame to another according to the Lorentz transformation. Defining $F^{\mu\nu}\equiv \partial^\mu A^\nu - \partial^\nu A^\mu$, the equation of motion for a test charged particle is : \begin{equation} m\dfrac{dv^\mu}{ds} = qv_\nu F^{\mu\nu} \end{equation}
{ "domain": "physics.stackexchange", "id": 35929, "lm_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, field-theory, classical-electrodynamics", "url": null }
cell-biology, immunology Title: Why MHC class I antigen presentation exist in normal cells? The book "Kuby Immunology" states that normal infected cells might present antigenic peptides on their surface via MHC class I, but these can't activate naive CD8 cells. Only infected professional antigen presenting cells have the necessary co=stimulatory signals to do so. This is why cross presentation happens. But then why does the process of antigen presentation on normal infected cells happen then, if it is of no use? It is of use. They're saying that naive T cells cannot be activated by normal cells because the latter lack the appropriate co-stimulus, namely B7. However, activated CD8+ T cells can recognize antigens presented by normal cells and form a response. This is how cytotoxic T cells are able to eliminate transformed or infected cells.
{ "domain": "biology.stackexchange", "id": 3914, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-biology, immunology", "url": null }
electric-circuits, electrical-resistance, approximations, scales Title: Why is current not 0 in a regular resistor - battery circuit immediately after you closed a circuit? In regular open circuits with either a capacitor or inductor element, (when capacitor is uncharged) with a battery, when a switch is closed to complete the circuit the current is said to be 0 because current doesn't jump immediately. But in a circuit with just resistors, as soon as a switch is closed the current isn't 0? Example is this question from 2008 AP Physics C Exam http://apcentral.collegeboard.com/apc/public/repository/ap08_physics_c_em_frq.pdf http://www.collegeboard.com/prod_downloads/ap/students/physics/ap08_physics_c_e&m_sgs_rev.pdf
{ "domain": "physics.stackexchange", "id": 4412, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electric-circuits, electrical-resistance, approximations, scales", "url": null }
respiration, pathophysiology, homeostasis, ph, anaerobic-respiration Title: Why do you die if you cannot breathe? I was wondering what the actual reason for death by suffocation is. Obviously it is related to oxygen deprivation. But what is the underlying cause of death?
{ "domain": "biology.stackexchange", "id": 4891, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "respiration, pathophysiology, homeostasis, ph, anaerobic-respiration", "url": null }
The concept of several literally "indistinguishable" things is paradoxical. For example, If we had two balls that were literally indistinguishable, then we wouldn't have two balls. We would have only one ball. They would be the same ball. If we want to reason about several "indistinguishable" things we have to keep in mind that they are indistinguishable with respect to some properties but distinguishable with respect to others. Suppose we have 4 cards, C1,C2,C3,C4, and a set of 4 (distinct) labels: M1,M2,K1,K2. How many "ways" can the 4 labels be assigned to the 4 cards? We have 4 choices of a label for card C1, 3 choices of a label for card C2, etc. So we have a total of (4)(3)(2)(1) = 24 "ways". Suppose we wish to consider M1 and M2 "indistinguishable" (with respect to their having the same "M-ness"). Then a "way" like C1=M1, C2=M2, C3= K1, C3= K2 is no longer distinct from a "way" like C1=M2, C2 =M1,C3 =K1, C3 = K2
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707986486796, "lm_q1q2_score": 0.8420422912926377, "lm_q2_score": 0.8615382129861583, "openwebmath_perplexity": 834.9612808555636, "openwebmath_score": 0.8907472491264343, "tags": null, "url": "https://www.physicsforums.com/threads/a-specific-combination-problem.939031/" }
homework-and-exercises, special-relativity, acceleration, rocket-science, interstellar-travel $$ M = 2m(\gamma -1) $$ where $m$ technically still includes the initial fuel load! In contrast, the Baez page does account for fuel consumption while applying energy and momentum conservation, and finds that the required fuel (M) to payload (m) mass ratio is $$ \frac{M}{m} = e^{\frac{aT}{c}} - 1 $$ where $a$ is the constant acceleration in the traveler's frame and $T$ is the total trip proper time. As an exercise, you may want to check that the above expression can be cast in the much simpler form $$ \frac{M}{m} = \frac{2 \frac{v}{c}}{1 - \frac{v}{c}} $$ where $v$ is again the maximum velocity at trip midpoint (acceleration and deceleration legs being assumed of practically identical durations).
{ "domain": "physics.stackexchange", "id": 31198, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, special-relativity, acceleration, rocket-science, interstellar-travel", "url": null }
electromagnetism, visible-light Once the light has emitted these photons, they are not created or destroyed: the number of them is constant (again, see caveat below). So the number of photons per second crossing any surface surrounding the light bulb is the same. So, now, consider two spheres surrounding the bulb, one of which has radius $r_1$, and one of which has radius $r_2$. The number of photons crossing each of these spheres is the same. But the surface area of the spheres is not the same: the first sphere has area $4\pi r_1^2$, and the second has area $4\pi r_2^2$. So the number of photons crossing a given unit area of the spheres is different. And, in fact, if the total number of photons per second is $N$, then the number per unit area is $$\frac{N}{4\pi r^2}$$
{ "domain": "physics.stackexchange", "id": 42385, "lm_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 }
general-relativity, gravitational-waves Title: Can revolving movement also generate gravitational waves? If an object revolves around a circular path at the speed of light could it still generate gravitational waves and what would be the simulation in inner area? Object can't go with the speed of light on the Special Relativity, on which the General Relativity is based upon. The gravitational waves are predicted and calculated by the General Relativity, i.e. if you are talking about them, you are using the terminology of a theory which closes out the things going with the speed of the light. But we can talk about an object near the speed of light. It doesn't need to go with around $c$. If it accelerates, it produces gravitational waves and if it is on a circular orbit, it accelerates. (With some exception: for example an (around it centre) rotating planet doesn't emit GW.)
{ "domain": "physics.stackexchange", "id": 32386, "lm_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, gravitational-waves", "url": null }
electromagnetism, experimental-physics, education For two isolated parallel plates, $\delta < 0.5$ is needed to charge the plates to any significant voltage because secondary electrons cause a current to flow between the two plates discharging the capacitor. The problem is that once any significant negative charge has built up on the plate hit by the beam, there will be an electric field between the plates so that when an a secondary electron is knocked out of the negative plate, it will likely travel to the other (relatively positive) plate and increase the negative charge on that plate, reducing the electric field between the plates. An incident electron hitting the negative plate charge will on average increase that plate's charge by $(1-\delta)e$, while the positive plate charge will increase by $\delta e$, so the charge difference between the plates will be $(1-2\delta)e$. For the charge difference between the plates to build up, we need $\delta<0.5$, which would be unusual.
{ "domain": "physics.stackexchange", "id": 48497, "lm_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, experimental-physics, education", "url": null }
ApolloniannetworkQ[g_] := If[ChromaticPolynomial[g, 4] == 24, True, False] g = GraphData["GoldnerHararyGraph"]; ApolloniannetworkQ[g] It may not be algorithmically efficient to compute ChromaticPolynomial of a graph. I don't know if there is a good way to determine whether a plane graph is an Apollonian network. According to Wikipedia, a graph is Apollonian if it is chordal and maximal planar. IGraph/M implements checks for these. Thus we can use Needs["IGraphM"] apollonianQ[g_?UndirectedGraphQ] := IGChordalQ[g] && IGMaximalPlanarQ[g] Let us generate a few non-isomorphic Apollonian networks on v=8 vertices using rejection sampling: v = 8; Table[ IGTryUntil[apollonianQ]@RandomGraph[{v, 3 v - 6}], 100 ] // DeleteDuplicatesBy[IGBlissCanonicalGraph] Plot them as planar graphs: IGLayoutPlanar /@ %
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357591818725, "lm_q1q2_score": 0.8004346414603758, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 467.59290079596263, "openwebmath_score": 0.603377103805542, "tags": null, "url": "https://mathematica.stackexchange.com/questions/261923/how-to-determine-that-a-plane-graph-is-an-apollonian-network" }
c#, strings /// <summary> /// Gets a value indicating whether the state has children. /// </summary> public bool HasChildren { get { return this.children.Length > 0; } } /// <summary> /// Gets or sets the last edge out of the state. /// </summary> public State LastChild { get { var length = this.children.Length; return length > 0 ? this.children[length - 1].State : null; } set { var lastIndex = this.children.Length - 1; var lastChild = this.children[lastIndex]; this.children[lastIndex] = new Edge(lastChild.Label, value); } }
{ "domain": "codereview.stackexchange", "id": 8556, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, strings", "url": null }
buoyancy $F_B = p_w V g$ Where $F_B$ is the buoyant force, $p_w$ is the density of water (1g/ml), $V$ is volume of the water displaced, and $g$ is gravity. The key here is $V$. If the cylinder is pushed halfway under the water, then the volume of water displaced is equal to half of the volume of the cylinder. If it's pushed completely under the water, then the volume of water displaced is equal to the volume of the cylinder, and so on. (Let's assume this cylinder is rigid and won't crumple from the water pressure) As long as the cylinder is completely submerged, the volume of water displaced does not change, so the buoyant force doesn't change, no matter how deep it is. So in conclusion, yes, as the cylinder gets deeper, the force required to push it down increases until it become completely submerged. At that point it does not require any extra force to push down the further it goes.
{ "domain": "physics.stackexchange", "id": 36015, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "buoyancy", "url": null }
asymptotics, landau-notation Title: Big-O Notation Statement True? Considering functions f and g, is the following true? $ (f \in O(g)) \implies (f \in \Theta(g)) \lor (f \in o(g))$ If not, can you please state an example? Despite thinking hard, i could not find one. Thanks a lot! No, this is not true. For example, let $f$ be the constant $1$ function, and define $g$ by $g(2n) = 1/n$ and $g(2n+1) = 1$.
{ "domain": "cs.stackexchange", "id": 5327, "lm_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, landau-notation", "url": null }
c#, file-system, event-handling public int WaitingTime { get; set; } //waiting time, any new event raised with same file source will discard previous one public ModifiedFileSystemWatcher(string filename="", string filter="*.*"):base(filename,filter) { base.Changed += ModifiedFileSystemWatcher_Changed; base.Created += ModifiedFileSystemWatcher_Created; base.Deleted += ModifiedFileSystemWatcher_Deleted; base.Renamed += ModifiedFileSystemWatcher_Renamed; WaitingTime = 100; } void PreventDuplicate(FileSystemEventHandler _event, FileSystemEventArgs e) { if (_event != null) { //create a reference BooleanWrapper w = new BooleanWrapper() { value = true }; //this event will be fired
{ "domain": "codereview.stackexchange", "id": 7400, "lm_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#, file-system, event-handling", "url": null }
neuroscience, neurophysiology, neurotransmitter, central-nervous-system It is indeed true that many anti-anxiety medications, particularly the benzodiazepines, act primarily to increase GABAergic activity by potentiating GABA receptors. However, it is also true that GABAergic activity is not some monolithic attribute of the brain. Different brain regions have different functions, and some brain regions are associated with behavioral or neurochemical inhibition of other regions. An increase in GABA activity in a brain region that tends to inhibit others could theoretically be anxiety-inducing rather than anxiety-calming, even if the overall effect of increasing GABAergic effects is anxiety-calming. Looking at GABA levels is also only one part of the picture, and it fails to tell you a) how often GABAergic cells are releasing neurotransmitter, and b) how sensitive post-synaptic cells are to GABA. The overall effect of GABA is going to be roughly proportional to (GABA concentration) * (how often GABA is released) * (sensitivity to GABA).
{ "domain": "biology.stackexchange", "id": 8053, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, neurophysiology, neurotransmitter, central-nervous-system", "url": null }
biochemistry, gene-expression, genetics A postdoc I used to work with advised me, "don't go looking for 2-fold changes in biology," by which he meant don't spend too much time on questions where the size of the effect you are looking at is minor and very difficult to distinguish from noise, bias, measurement error, or other confounding variables. Obviously there are limitations to this advice; a lot can be learned from the the combination of several seemingly minor effects that have big cumulative consequences for an organism. But as a rule of thumb, it's so hard to get strong results when your effect size is so small that going after small effects is justifiable only if you have a good reason to believe there is some profound, fundamental biology behind them. My view is that the consensus of the scientific community up to this point has been that untangling the role of lacA in the lac operon and more broadly in bacterial physiology would involve too much work for too little payoff.
{ "domain": "biology.stackexchange", "id": 1517, "lm_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, gene-expression, genetics", "url": null }
ros, gazebo-ros-control, ros-kinetic, grasp ... using 'set position' or 'set velocity' in gazebo forces the physics simulation to try and accomplish this, which results in strange behavior. It's actually preferable, according to the Gazebo team members I'm working with, to always use 'set force' in Gazebo because that allows a more normal interaction when the commanded force of an arm joint puts the arm in contact with the environment. Following an example, I made local changes to the universal_robot package to use EffortJointInterface instead. Some gain values from ARIAC provide decent performance. Thanks to everyone who contributed suggestions! Originally posted by raequin with karma: 368 on 2018-09-17 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 30827, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo-ros-control, ros-kinetic, grasp", "url": null }
general-relativity, reference-frames, speed-of-light, observers, cosmological-inflation Going to the derived from Maxwell's equation's response I've also seen a lot - Why wouldn't changes in gravity also affect these? Am I taking the statement "It's all relative" too literally here? Further, I just thought back to the fact light can't escape a black hole, which means it is affected by gravity, right? So why is that effect ignored in all our modern equations? Is it really nothing/negligible when measuring the distance of something like another galaxy (or the particle horizon for that matter)?
{ "domain": "physics.stackexchange", "id": 90430, "lm_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, reference-frames, speed-of-light, observers, cosmological-inflation", "url": null }
php, object-oriented, laravel, controller if ($request->hasFile('image')) { $request->file('image'); $filename = $request->image->getClientOriginalName(); $originalfile['image'] = $request->image->storeAs('public/private_job', $filename); $data = array_merge($values, $originalfile); $this->_updatePrivatejobadb($data, $id); catagory_private_jobadb::where('private_jobads_id', $id)->delete(); $this->_saveCatagoryPrivateJobadbAssociations($values['catagory_id'], $id); privatejobcity::where('private_jobabd_id', $id)->delete(); $this->_savePrivateJobCities($values['city_id'], $id); //a flash message shold be shown that data successfully updated flash('Data successfully updated')->success(); return back(); } else
{ "domain": "codereview.stackexchange", "id": 27340, "lm_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, laravel, controller", "url": null }
databases $F^+=\{$ Y $\rightarrow$ Z $\ |\ $ Y $\cup$ Z $\subseteq$ X $\wedge\ F \models$ Y $\rightarrow$ Z $\}$ $F \models $ Y $\rightarrow$ Z means that any database instance that satisfies every functional dependency of $F$ also satisfies Y $\rightarrow$ Z Generally speaking, the term closure is used when you have sets of items and some kind of operation that, given one or more items, can produce more such items. The closure of a set of items with respect to the operation is the set obtained by applying the operation on items in the set in whichever way possible, adding the resulting items to the set, and repeating this until no more items can be added (which may be infinitely often). The resulting set is the smallest set that includes the original set and is closed under the operation (in the sense that all possible applications of the operation on items in the set produce items that are also in the set). Examples:
{ "domain": "cs.stackexchange", "id": 1256, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "databases", "url": null }
c++, unit-testing, reinventing-the-wheel, c++14 fail = 1; } catch(...) { std::cout << " Test case '" << m_testCases[i].name << "' Unexpected type thrown!\n"; fail = 1; } }
{ "domain": "codereview.stackexchange", "id": 12356, "lm_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++, unit-testing, reinventing-the-wheel, c++14", "url": null }