text
stringlengths
1
1.11k
source
dict
satisfiability, lambda-calculus, kolmogorov-complexity non-deterministically represented candidate program What does this mean? Is the program non-deterministic? Or its representation? What even is a non-deterministic representation? static once created and have a small number of predefined variables within each combinator Again, what does this mean? My example doesn't seem to fit this, but if whatever you're dealing with us Turing Complete, my gut says your problem is likely to be $EXPTIME$-hard.
{ "domain": "cs.stackexchange", "id": 9660, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "satisfiability, lambda-calculus, kolmogorov-complexity", "url": null }
From here I cannot see how to continue.( I tried to multiply the denominator and the numerator by $$\sqrt{2t}-\sqrt{1-t^{2}}$$ but it also seems like a dead end. In the other way that I tried, I did found an antideriviative of the integrand, but not in the segment $$[0,\frac{\pi}{2}]$$ because if we could divide by $$\sqrt{\sin x}$$ then we'd get: $$\int\frac{1}{1+\sqrt{\cot x}}dx$$ then if we substitue $$\sqrt{\cot x}=t$$ then $$\sqrt{\cot x}=t$$ so $$\frac{1}{2t}\cdot\frac{-1}{\sin^{2}x}dx=dt$$ and since $$\frac{1}{\sin^{2}x}=1+\cot^{2}x$$ we would get $$dx=\frac{-2t}{1+t^{4}}dt$$ Thus $$\int\frac{1}{1+\sqrt{\cot x}}dx=-\int\frac{2t}{\left(1+t\right)\left(1+t^{4}\right)}dt=-\int\frac{2t}{\left(1+t\right)\left(t^{2}-\sqrt{2}t+1\right)\left(t^{2}+\sqrt{2}t+1\right)}dt=-\int\left(\frac{-1}{t+1}+\frac{1+\sqrt{2}}{2\left(t+\sqrt{2}\right)}+\frac{1-\sqrt{2}}{2\left(t-\sqrt{2}\right)}\right)dt$$ and finally:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9802808765013519, "lm_q1q2_score": 0.8351530320816365, "lm_q2_score": 0.8519527944504227, "openwebmath_perplexity": 356.21363580458626, "openwebmath_score": 0.9955453872680664, "tags": null, "url": "https://math.stackexchange.com/questions/3799710/how-to-calculate-intop-0-frac-pi2-frac-sqrt-sin-x-sqrt-sin-x/3799719" }
gravity, newtonian-gravity, astrophysics, stellar-physics There are 3 known analytic solutions. $n=0$ $$ \theta(\xi) = 1-\frac{1}{6}\xi^2$$ $n=1$ $$\theta (\xi)= \frac{\sin \xi}{\xi}$$ $n=5$ $$\theta(\xi) = \frac{1}{\sqrt{1+\xi^2/3}}$$ In general, all solutions with $n<5$ has $\theta=0$ at finite $\xi=\xi_0$. Beyond that point, the solution for density becomes negative. In astronomy, we define this $0$ to be the (dimensionless) radius of the star given the polytropic index. But, I am irritated that the solution goes negative and I cannot come up with good logical explanation preventing that. Of course, physically, when density approaches to $0$ the pressure drops more quickly in case of $n>1$. It is not that strange that after some point pressure and density vanishes. But I want mathematical support for this issue, and I think there is an unused condition that can solve this problem. What did I miss? What I could think of is
{ "domain": "physics.stackexchange", "id": 21480, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity, newtonian-gravity, astrophysics, stellar-physics", "url": null }
What I found out is that this polynomial must be a square of prime number, otherwise it will have more than 3 divisors. Or fewer. To rephrase and elaborate on greedoid's answer in a way that doesn't involve complete factoring: So if if the polynomial factor as $$r(n)q(n)$$ we must have either $$r(n) = 1; q(n) = p^2$$ for some $$n$$ and prime $$p$$ or $$r(n) =q(n)=p$$ for some $$n$$ and prime $$p$$. Note that if $$n =-1$$ we get the polynomial is $$0$$ so $$n+1$$ factors. And $$\frac {n^7 + n^6 + n^5 + 1}{n+1} = n^6 + n^4 -n^3 +n^2 -n + 1$$. If $$n+1 = 1$$ then we get $$n = 0$$ and .... the other is $$1$$ and that won't do. It's pretty clear if $$n > 1$$ then $$n^6 + ... etc > 1$$ so $$(n+1) = p^2$$ and $$n^6 + ... etc = 1$$ is out of the question. That just leaves $$n + 1 = n^6 + .... = p$$ as an option. And for that to work we must have $$n = 1$$. And in that case it does work out that $$n+1 = n^6 + ... etc = 2$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446463891304, "lm_q1q2_score": 0.8236473290203976, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 242.0241764696315, "openwebmath_score": 0.7237284779548645, "tags": null, "url": "https://math.stackexchange.com/questions/3023020/find-all-natural-numbers-n-such-that-polynomial-n7n6n51-would-have-ex" }
universe, photons What will eventually happen to this photon? Will it eventually reach the other end of the universe, and if so, what would happen to it there? Your statement "most of the universe is composed of mostly empty space" is very vague. In reality, the Universe is embedded in diffuse background photon fields, from low energy (like the so-called cosmic microwave background which is relic from the big bang) to very high energy (from the extreme compact objects, like AGNs). Of course, there is also unknown dark matter. It seems that dark matter probably only takes part in weak interaction. Thus, it probably won't interact with photons (the same argument with cosmic background neutrinos). The chance of photon-photon interaction and photon-electromagnetic-fields interactions depends on the energy of the photons. For high energies, it is not low as you expected. Even if a photon gets lucky and doesn't interact with the other particles, still it won't reach the edge of the Universe. The reason is
{ "domain": "astronomy.stackexchange", "id": 2315, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "universe, photons", "url": null }
example: 1D implicit heat equation 1. The general 1D form of heat equation is given by which is accompanied by initial and boundary conditions in order for the equation to have a unique solution. Over time, we should expect a solution that approaches the steady state solution: a linear temperature profile from one side of the rod to the other. 2 Initial condition and boundary conditions To make use of the Heat Equation, we need more information: 1. Much attention has been. sol = pdepe(m,@pdex,@pdexic,@pdexbc,x,t) where m is an integer that specifies the problem symmetry. Lecture 04: Heat Conduction Equation and Different Types of Boundary Conditions - Duration: 43:33. 1 Heat Equation We consider the heat equation satisfying the initial conditions (ut = kuxx, x. 6 Inhomogeneous boundary conditions. Solving the 1D heat equation Consider the initial-boundary value problem: Boundary conditions (B. Cranck Nicolson Convective Boundary Condition. Next we show how the heat equation ∂u ∂t = k
{ "domain": "umood.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138138113965, "lm_q1q2_score": 0.8210195020805188, "lm_q2_score": 0.83973396967765, "openwebmath_perplexity": 512.9019421213272, "openwebmath_score": 0.8403221964836121, "tags": null, "url": "http://pziq.umood.it/heat-equation-boundary-conditions.html" }
c++, algorithm, c++11, regex, c++14 If multiple answers still have a tied score, return the answer that comes first lexicographically. Complete the definition of function string calculateScore(string text, string prefix,string suffix)
{ "domain": "codereview.stackexchange", "id": 22107, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, c++11, regex, c++14", "url": null }
algorithm, coverage, planning Title: What's an efficient way to visit every reachable space on a grid with unknown obstacles? I'm trying to create a map of the obstacles in a fairly coarse 2D grid space, using exploration. I detect obstacles by attempting to move from one space to an adjacent space, and if that fails then there's an obstacle in the destination space (there is no concept of a rangefinding sensor in this problem). example grid http://www.eriding.net/resources/general/prim_frmwrks/images/asses/asses_y3_5d_3.gif (for example) The process is complete when all the reachable squares have been visited. In other words, some spaces might be completely unreachable even if they don't have obstacles because they're surrounded. This is expected.
{ "domain": "robotics.stackexchange", "id": 789, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, coverage, planning", "url": null }
dataset, bigdata, data-cleaning, data-wrangling I am trying to calculate and attach the total_precipitation for each trip, as a column. I do this by looking up the start_timestamp and end_timestamp datetime for each trip from trips_df, in the weather_df, and summing the precipitation_amount within those times, then attaching that value back in the trips_df under the new column. I can attach the code if it's helpful. I ran the code on a subset of 65 entries and it took ~1.3s. (CPU times: user 1.27 s, sys: 8.77 ms, total: 1.28 s, Wall time: 1.28 s). Extrapolating that performance to my entire data, it would take (1.3 * 1048568)/65 = 20971.36seconds or 5.8hours. What am I supposed to do in this situation? For context, this is a Kaggle style data science project so I'll have to do further data wrangling, and data extraction then apply a predictive model. As hinted at by @spacedman I was doing the timestamp lookups wrong.
{ "domain": "datascience.stackexchange", "id": 5210, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dataset, bigdata, data-cleaning, data-wrangling", "url": null }
php, symfony2, trait These are all valid child classes, however: these are not. They are evil, but sadly commonplace: class Bastard extends Base { public function __construct() { } } class Ungrateful extends Base { public function __construct(array $param = null) {} } class EvilTwin extends Base { public function __construct(stdClass $param) { parent::__construct( (array) $param); } } class Psychopath extends Base { public function __construct(PDO $db, array $parent = null) { if (!$parent) { $parent = [1, 2, 3]; } parent::__construct($parent); } }
{ "domain": "codereview.stackexchange", "id": 26993, "lm_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, symfony2, trait", "url": null }
newtonian-mechanics, classical-mechanics, spring The ramp is frictionless, and the spring is initially at it's relaxed length, and the angle is $\theta = 45^{\circ}$. I worked through this by considering the potential energy lost as the kinetic energy gained just before the mass hits the spring, with the equation $mgh = \frac{1}{2}mv^2$, and plugging in the known values, getting: $40\cdot9.8\cdot\frac{2}{\sqrt{2}} = \frac{1}{2} \cdot 40 \cdot v^2$, to solve for $v$, which gives $v = 5.25 \frac{m}{s}$. However, I am unsure whether this is the correct answer, as I am unsure when the maximum speed occurs. If it exists after the compression of the spring, how do I go about calculating it? Thank you. The motion of the box along the slope is dictated by two forces which act parallel to the slope. The component of the weight of the box down the slope which acts all the time and the force up the slope due to the spring which acts only when the box is in contact with the spring.
{ "domain": "physics.stackexchange", "id": 35334, "lm_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, classical-mechanics, spring", "url": null }
electricity, inductance If I consider the case of connecting them parallel the same problem will occur but for the current rather than voltage. If you have a stationary circuit then Pekov's comment is the correct approach. The energy stored in an inductance in the quasistatic limit is approximately $\frac{1}{2}LI^2$ and the power dissipated through a stationary resistor is $RI^2$ so we get the total rate of energy loss to be $$RI^2+LI\frac{dI}{dt}.$$ And expressing that in a per current fashion we get $$\frac{P}{I}=RI+L\frac{dI}{dt}.$$ And we know the powers add because the energy loss of the resistor is thermal so has no phase coupling to the inductive fields.
{ "domain": "physics.stackexchange", "id": 28389, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, inductance", "url": null }
time Title: In the calculation of GMST, what are these constants? GMST = 6.697374558 + 0.06570982441908 D0 + 1.00273790935 H + 0.000026 T2 From the GMST calculation on the USNO website (and many other places) we encounter these constants: 6.697374558 0.06570982441908 1.00273790935
{ "domain": "astronomy.stackexchange", "id": 3286, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time", "url": null }
ros, opencv, camera1394, libusb Title: ROS, Camera1394, and libusb issue Hello, This is a repost of a question asked over at Ask Ubuntu where I thought this might be more appropriate, but sadly I didn't get any bites. I'm trying to get up and running with a Point Grey Firefly MV with ROS and OpenCV. I've installed ROS (Desktop-Full, if it matters) on Ubuntu 10.10, and installed the camera_drivers package. After much poking and prodding I've gotten ROS, OpenCV, and libdc1394 installed and (apparently) functioning correctly. I wrote a ROS launch file which should start the camera and display the output in a window on my computer. However, when I run this launch file, I get the following errors from libusb and libdc1394: libusb couldn't open USB device /dev/bus/usb/002/007: Permission denied. libusb requires write access to USB device nodes. libdc1394 warning: usb: Failed to open device for config ROM libdc1394 warning: Failed to get config ROM from usb device
{ "domain": "robotics.stackexchange", "id": 5582, "lm_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, opencv, camera1394, libusb", "url": null }
php, mvc, laravel, rest if ($is_same_address) { $delivery_city = $pickup_city; $delivery_state = $pickup_state; $delivery_number = $pickup_number; $delivery_suite = $pickup_suite; $delivery_street = $pickup_street; $delivery_zip = $pickup_zip; $delivery_line1 = $pickup_number . ' ' . $pickup_street; } else { $delivery_city = isset($input['customer']['address']['delivery']['city']) ? $input['customer']['address']['delivery']['city'] : ''; $delivery_state = isset($input['customer']['address']['delivery']['state']) ? $input['customer']['address']['delivery']['state'] : ''; $delivery_number = isset($input['customer']['address']['delivery']['number']) ? $input['customer']['address']['delivery']['number'] : ''; $delivery_suite = isset($input['customer']['address']['delivery']['suite']) ? $input['customer']['address']['delivery']['suite'] : '';
{ "domain": "codereview.stackexchange", "id": 14417, "lm_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, mvc, laravel, rest", "url": null }
ros, rviz, beaglebone, xv-11-laser-driver, ros-groovy Title: Confused about getting XV11 laser data into rviz Okay, so I finally know enough about ROS to totally tie myself up in knots here. I've got my Neato laser up and running and pumping but data to the /scan topic but not seeing anything in rviz. I'm running Groovy on a Beaglebone w/ Precise LTS (12.04). I'm running rviz remotely on a separate laptop, also running Groovy on Precise LTS. I have a Neato LIDAR hooked up to it, running the cwru-ros-pkg XV11 laser driver. rostopic shows the laser successfully publishing to a topic called "/scan": ubuntu@arm:~$ rostopic list /rosout /rosout_agg /scan ubuntu@arm:~$
{ "domain": "robotics.stackexchange", "id": 14066, "lm_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, beaglebone, xv-11-laser-driver, ros-groovy", "url": null }
ros, client-rosjava, rosjava, android Original comments Comment by paulofinseca on 2013-02-23: I have something similar. But when I run, an error occurs: 02-23 17:07:52.778: E/AndroidRuntime(671): org.ros.exception.RosRuntimeException: Connection exception: paulofonseca-PC:37008 02-23 17:07:52.778: E/AndroidRuntime(671): at org.ros.internal.transport.tcp.TcpClient.connect(TcpClient.java:109 Comment by PeterMilani on 2013-02-24: check your logcat and see where in your program the exception is thrown. The reference you give only specifies a library file (TcpClient.java) but if you can scroll down you should see your file name with a line number. This should give some clue as to what is causing this exception. Comment by thomasL on 2014-05-22: I have the same issue : org.ros.exception.RosRuntimeException: Connection exception: ubuntu:38403 at org.ros.internal.transport.tcp.TcpClient.connect(TcpClient.java:109) Have you find a solution?
{ "domain": "robotics.stackexchange", "id": 12995, "lm_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, client-rosjava, rosjava, android", "url": null }
human-biology, immunology, bacteriology, pathology, vaccination I am unable to understand the relation between exposure to noninfectious mycobacteria and lessening of efficacy of BCG vacccine. What exactly is the "interference" caused by the noninfectious mycobacteria ? The exposure to environentally occurring Mycobacteria causes a immune response to these (mostly unspecific, since no real infections occur). It seems that immunizations with BCG in these individuals is causing either no, or only a very attenuated immune response This is shown in this ("BCG-induced increase in interferon-gamma response to mycobacterial antigens and efficacy of BCG vaccination in Malawi and the UK: two randomised controlled studies.") in which individuals with a high environmental exposure to mycobycteria showed only a very small response to this vaccination. If this natural level of immunity is enough to produce immunity to tuberculosis is unknown (and can not be tested for obvious reasons).
{ "domain": "biology.stackexchange", "id": 1957, "lm_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, immunology, bacteriology, pathology, vaccination", "url": null }
python, performance, graph 2. Performance The problem with the performance is that whenever it reaches a point where the cycle cannot be extended, the code searches along the cycle to try to find a node which still has edges. In the worst case, a graph with \$n\$ nodes and \$O(n)\$ edges might have \$Θ(n)\$ points where the cycle cannot be extended, and at each of these points the code will have to search \$Θ(n)\$ nodes in the cycle. In this case the overall runtime will be \$Θ(n^2)\$, that is quadratic. The worst case arises in graphs like this: and we can build these graphs systematically if we define get_graph like this: def get_graph(n): "Return a worst-case graph with n nodes and 2n edges." return {i:[min(i + 1, n - 1), max(i - 1, 0)] for i in range(n)}, 2 * n
{ "domain": "codereview.stackexchange", "id": 29640, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, graph", "url": null }
newtonian-gravity, energy-conservation, potential-energy Experiment 2 I lift an object a distance $h$ above ground level, increasing its potential energy, but I keep lifting it indefinitely. I imagine that at one point it will be so far removed from the gravitational pull of Earth that its potential energy starts to decrease again. Indeed, according to this wiki page, the acceleration due to gravity is proportional to the inverse squared distance to the center of the Earth, so if $d$ is this distance, then $g = \frac{k}{d^2}$ for some constant $k$. If I let $r$ be the radius of the Earth, the potential energy is given by \begin{align*} E &= mgh\\ &= m\frac{k}{d^2}h\\ &= m\frac{k}{(r+h)^2}h. \end{align*} As a function of $h$, this function turns out to be increasing for $h<r$ and decreasing for $h>r$, so as I am raising the object past the point $h=r$, it starts losing energy. My questions are, where is this energy going? And where is the energy that I spend raising the object going, when it is past the point $h=r$? To 1
{ "domain": "physics.stackexchange", "id": 77426, "lm_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, energy-conservation, potential-energy", "url": null }
- Are there non-separated varieties? –  Matt Oct 23 '12 at 16:03 Yes - one example is 'the affine line with two origins'. The underlying set of this is constructed as follows: you take the disjoint union of two copies of $\mathbb{A}^1$ (call the coordinate on the first one $x$ and the coordinate on the second $y$) and quotient out by the relation $x$ ~ $y$ if and only if $x \neq 0$ and $y \neq 0$ and $x = y$. You give it the variety structure such that the quotient map is a morphism of varieties. –  AKr Oct 23 '12 at 16:37 However, every (quasi-)affine and every (quasi-)projective variety is separated I believe. –  AKr Oct 23 '12 at 16:40
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9496693702514737, "lm_q1q2_score": 0.8163963291603206, "lm_q2_score": 0.8596637469145054, "openwebmath_perplexity": 224.84438009001894, "openwebmath_score": 0.9441254138946533, "tags": null, "url": "http://math.stackexchange.com/questions/219335/separated-varieties-and-uniqueness-of-extension" }
navigation, ros-melodic, move-base, amcl Title: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.1600 seconds Hi there, why is this happening after I send a nav goal? <launch> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find amcl)/rviz/amcl.rviz"/> <!-- Map server --> <arg name="map_file" default="$(find amcl)/maps/test_map.yaml"/> <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" /> <node pkg="amcl" type="amcl" name="amcl">
{ "domain": "robotics.stackexchange", "id": 35754, "lm_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, ros-melodic, move-base, amcl", "url": null }
magnetic-fields, classical-electrodynamics, singularities, dirac-delta-distributions, magnetostatics Now if instead of a single dipole $\textbf{m}$ we have a distribution such that $d\textbf{m}=\textbf{M}dV$ then we get $\textbf{B}(\textbf{r}) =\left\{\begin{matrix} \mu_0 \textbf{M}(\textbf{r})+ \mu_0 \textbf{H}(\textbf{r}) & \textbf{r}\in V\\ \mu_0 \textbf{H}(\textbf{r}) & \textbf{r}\notin V \end{matrix}\right.$ The magnetization occupies the 3d region $V$ and the $\textbf{H}$ is defined as the gradient of the scalar potential $$\textbf{H}(\textbf{r})=-\nabla\phi(\textbf{r})$$ and $$\phi(\textbf{r})=\frac{1}{4\pi}\int_{\textbf{r}'\in V} \frac{\textbf{M}\cdot (\textbf{r}-\textbf{r}')^0} {|\textbf{r}-\textbf{r}'|^2}dV$$
{ "domain": "physics.stackexchange", "id": 53277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetic-fields, classical-electrodynamics, singularities, dirac-delta-distributions, magnetostatics", "url": null }
gazebo, navigation, rviz, ros-kinetic, ubuntu <link name="hokuyo_link"> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <box size="0.1 0.1 0.1"/> </geometry> </collision> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0.1 0.1 0.1" /> </geometry> </visual> <inertial> <mass value="1e-5" /> <origin xyz="0 0 0" rpy="0 0 0" /> <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6"/> </inertial> </link> <joint name="hokuyo_joint" type="fixed"> <axis xyz="0 1 0" /> <origin xyz="0 0 0.2" rpy="0 0 0"/> <parent link="base_link"/> <child link="hokuyo_link"/> </joint>
{ "domain": "robotics.stackexchange", "id": 33477, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, navigation, rviz, ros-kinetic, ubuntu", "url": null }
inorganic-chemistry, solubility, ph, precipitation Title: Aluminium sulphate solubility as function of the pH earlier I asked about how to know the aluminium sulfate solubility as function of the ph (see the previous question here). I found this diagram on the page 57 of Rubin, A. J., & Hayden, P. L. (1973). Studies on the Hydrolysis and Precipitation of Aluminum (III). But I'm a little confused about the interpretation. Is the $\mathrm{Al_{2}(SO_{4})_{3}}$ insoluble between pH 5 and 7?. What will be the correct interpretation of this diagram? The lack of continuity for the curve indicates that the concentration of $\ce{Al2(SO4)3}$ was below the detection limit of the analytical technique being used to measure the concentration of $\ce{Al2(SO4)3}$ in the solution. Theoretically there should be a continuous curve. +1 for asking this as a new question.
{ "domain": "chemistry.stackexchange", "id": 15057, "lm_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, solubility, ph, precipitation", "url": null }
learning-theory Learn at your own pace Work on anything that you like (provided that it is math related) It will give you hands on experience at code development, committing, bug reporting and tracking. Basically anything and everything that you'll ever need to become a full-on programmer. Many people who work on such projects are top notch experts in their fields, so this could be a real opportunity. You are contributing to society! Alternatively, you could also take some online coding tasks (http://www.topcoder.com/) and even get paid for them. However, if your coding knowledge is not too great, this may not be the ideal place to start. Good luck!
{ "domain": "cs.stackexchange", "id": 3975, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "learning-theory", "url": null }
microbiology, bacteriology Title: What constitutes as the death of a bacteria? I've read that some bacteria can survive a long time without food. What constitutes the death of a bacteria ? What process needs to take place for it to be considered dead? When you talk about organisms like fungi and bacteria which can have a dormant form, and viruses, "dead" becomes somewhat harder to define. In fact, it has not been definitively defined for bacteria. I would have guessed "when they are permanently unable to reproduce", but I may be wrong. From one source[1]:
{ "domain": "biology.stackexchange", "id": 5794, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "microbiology, bacteriology", "url": null }
int1... Separate functions separately and x = 0 and x = 0 the equation below is one that will. Solution ( ii ) in short may also be written as y this to this. Solving a differential equation a ), form differntial eqaution by grabbitmedia [ solved ]. Form a differential equation an equation can be modeled using a system of coupled partial differential Equations, dy/dx v! More on this topic yet it can be modeled using a system of partial! Obtained a general solution first, then substitute given numbers to find the particular solution given ! Question depends on the constants p and q us the answer into the original order. Odes that are encountered in physics are linear their equivalent and alternative forms that lead find! C. Verify that the solution is: int dy means int1 dy means dy..., a constant, K ) on the constants p and q a solution! ( and possibly first derivatives, second order DE: Contains second (! Satisfy this differential equation: separable by Struggling [ solved! ] then
{ "domain": "redwoodcc.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308772060157, "lm_q1q2_score": 0.8338788021379135, "lm_q2_score": 0.8438950966654774, "openwebmath_perplexity": 427.33132921606176, "openwebmath_score": 0.8397480249404907, "tags": null, "url": "http://redwoodcc.com/torani-vanilla-okw/differential-equation-solution-ab062e" }
quantum-algorithms, hamiltonian-simulation, hhl-algorithm, linear-algebra Title: Why is HHL the popular choice to solve QLSP and not the Childs et al. (2017) algorithm? The Childs, Kthari, and Rolando (2017) (CKS) algorithm can solve the quantum linear systems problem (QLSP) in $\operatorname{poly}(\log N, \log(1/\epsilon))$ time while the HHL algorithm solves it in $\operatorname{poly}(\log N, 1/\epsilon)$ time. So, if the CKS algorithm is superior, then why is the HHL more popular? Additionally, are there any examples of the CKS algorithm being used to solve a system of equations on a real or simulated quantum computer? HHL is more popular because it is much older (and it was the first in its category). The CKS algorithm (which you've been calling the Childs algorithm, even though the paper had three equally contributing authors in alphabetical order) is simply an improvement to the HHL algorithm in terms of its computational complexity.
{ "domain": "quantumcomputing.stackexchange", "id": 3293, "lm_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-algorithms, hamiltonian-simulation, hhl-algorithm, linear-algebra", "url": null }
navigation, odometry, turtlebot, robot-localization, ekf-localization tf frames Also i ran the command rosrun tf tf_echo /gyro_gram /base_link_fram and i was able to see the output. UPDATED ON 10/03/2016 4:10 PM Here is my launch file: <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true"> <param name="frequency" value="30"/> <param name="sensor_timeout" value="0.1"/> <param name="transform_time_offset" value="0.0"/> <param name="two_d_mode" value="true"/> <param name="map_frame" value="/map"/> <param name="odom_frame" value="/odom"/> <param name="base_link_frame" value="/base_footprint"/> <param name="world_frame" value="/odom"/> <param name="odom0" value="/odom"/> <param name="imu0" value="mobile_base/sensors/imu_data"/> <rosparam param="odom0_config">[false,false,false,false,false,false,true,true,true,false,false,false,false,false,false]</rosparam> <rosparam param="imu0_config">[false,false,false,true,true,true,false,false,false,true,true,false,true,true,true]</rosparam>
{ "domain": "robotics.stackexchange", "id": 25802, "lm_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, turtlebot, robot-localization, ekf-localization", "url": null }
vba, excel, game-of-life Private CellArrayThisTick As Variant Private CellArrayNextTick As Variant Private CellRange As Range Private Const XLength As Long = 100 Private Const YLength As Long = 100 Public Sub IncrementTick() StoreApplicationSettings DisableApplicationSettings Dim firstRow As Long, finalRow As Long Dim firstCol As Long, finalCol As Long firstRow = 1 firstCol = 1 finalRow = firstRow + (XLength - 1) finalCol = firstCol + (YLength - 1) Dim startCell As Range, finalCell As Range With ws_Simulation_Output Set startCell = .Cells(firstRow, firstCol) Set finalCell = .Cells(finalRow, finalCol) End With Set CellRange = ws_Simulation_Output.Range(startCell, finalCell) CellArrayThisTick = CellRange CellArrayNextTick = getCellArrayNextTick(CellArrayThisTick) CellRange.Cells.ClearContents CellRange = CellArrayNextTick RestoreApplicationSettings End Sub
{ "domain": "codereview.stackexchange", "id": 17514, "lm_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, game-of-life", "url": null }
star, planet, orbit Title: Why are solar systems heliocentric So this may be an incorrect assumption, but from my knowledge solar systems are heliocentric and there are always suns. (I realize to be a solar system there must be a sun semantically.) But it seems to me that planets and stars are just bodies of mass, so are there cases of solar systems where the star is just one of the bodies of the system and orbits around a super massive planet? And similarly are there 'solar systems' without stars, where there are a group of planets orbiting a massive planet at the center of the system? Generally, astronomical bodies rotate around their common center of mass, not the one or the other body.
{ "domain": "astronomy.stackexchange", "id": 2167, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "star, planet, orbit", "url": null }
physical-chemistry, thermodynamics, enthalpy, heat Title: How is enthalpy change equal to heat supplied at constant volume? We know that: $$\begin{align} H &= U + pV \\ \Delta H &= \Delta U + \Delta (pV) \end{align}$$ Now, If $p$ is constant, $$\begin{align} \Delta H &= \Delta U + p\Delta V \\ &= q_p + w + p\Delta V \\ &= q_p \qquad\qquad \text{(since } w = -p\Delta V\text{)} \end{align}$$ If $V$ is constant, $$\begin{align} \Delta H &= \Delta U + V\Delta p \\ &= q_V + w + V\Delta p \\ &= q_V + V\Delta p \qquad \qquad \text{(since } w = -p\Delta V = 0\text{)} \end{align}$$ We also know that at constant $V$, $$\Delta U = q_V$$ Now my question is that: my book says that at constant $V$, $q = \Delta H = \Delta U$, which I think is false, since I obtained $\Delta U = q_V$, but not $\Delta H = q_v$. Please tell me where am I going wrong?
{ "domain": "chemistry.stackexchange", "id": 5224, "lm_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, thermodynamics, enthalpy, heat", "url": null }
matlab, fft, fourier-transform, frequency-spectrum, frequency This process of inversion and conjugation in the frequency domain corresponds to complex conjugation of the complex baseband signal in the time domain, which is equivalent to simply inverting the $Q$ component. Since a phase shift of $180$ degrees is irrelevant, one can equivalently invert the $I$ component. A phase shift of $90$ degrees corresponds to a multiplication with $j$ in the time domain, and if this phase shift can be tolerated, you get the additional option of swapping the $I$ and $Q$ channels. If you want pure inversion of the frequency axis without conjugation, then you indeed need to invert the time axis of the corresponding time domain signal (as pointed out in a comment by @curiousStudent). Luckily this is usually not needed in practice because this can't be done easily in a real-time system. As a final note, all three options in your question do flip the magnitudes of the spectra around DC, it is just the phases that behave differently in all three cases.
{ "domain": "dsp.stackexchange", "id": 2980, "lm_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, fft, fourier-transform, frequency-spectrum, frequency", "url": null }
python, pandas, preprocessing Next, I was not clear, what was the intention behind the above step. By doing the above step, what am I suppose to learn ?. and >>> from sklearn.model_selection import StratifiedShuffleSplit >>> split = StratifiedShuffleSplit(n_splits=1, test_size=0.2, random_state=42) >>> for train_index, test_index in split.split(housing, housing["income_cat"]): strat_train_set = housing.loc[train_index] strat_test_set = housing.loc[test_index] >>> strat_test_set['income_cat'].value_counts() / len(strat_test_set) >>> 3.0 0.350533 2.0 0.318798 4.0 0.176357 5.0 0.114583 1.0 0.039729 Name: income_cat, dtype: float64
{ "domain": "datascience.stackexchange", "id": 3216, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, pandas, preprocessing", "url": null }
bandwidth, sinc The bandwidth of a single sinc pulse is Rp/2, what is the bandwidth of the whole signal s(t) consisting of several pulses, each of width Rp/2? The bandwidth of something is something that can be seen from the power spectral density, which in itself is an average. Hence, the spectrum of your transmission, assuming uncorrelated data symbols, is exactly the spectrum of your pulse. Your two questions are the most fundamental statements underlying all modern digital communications: you can transport data by sending a symbol impulse train through your pulse shaping filter the spectrum of the signal is defined only by pulse shape It feels a bit like you learned about 16QAM before learning the basics of complex baseband and modulation – maybe go a chapter back in your book until you find a block diagram showing a data source, a symbol mapper, a pulse shaper, and a mixer, and then refresh your knowledge of complex baseband, digital comms, if you feel like you're missing basics.
{ "domain": "dsp.stackexchange", "id": 9593, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bandwidth, sinc", "url": null }
r, phylogenetics, phylogeny, phangorn Title: Comparing phylogeny in R So I want to compare the phylogeny created using two methods for example Maximum likelihood and maximum parsimony.Is there any way to compare the two phylogeny ? I did read about phangorn but not sure if its the right R library for comparative analysis. Any suggestion or helped would be highly appreciated My data file library(phangorn) library(phytools) library(dendextend) data <- read.dna("abhi_seq/clean_dup_align_fast.fas", format = "fasta") data dat <- as.phyDat(data) dm <- dist.ml(dat) treeUPGMA <- upgma(dm) treeNJ <- NJ(dm) layout(matrix(c(1,2), 2, 1), height=c(1,2)) par(mar = c(0,0,2,0)+ 0.1) plot(treeUPGMA, main="UPGMA") plot(treeNJ, "phylogram", main="NJ") dev.off() parsimony(treeUPGMA, dat) parsimony(treeNJ,dat) tr.mp <- optim.parsimony(treeNJ, dat) #tr.ml = optim.pml(treeNJ, dat) fit <- pml(treeNJ, dat) fit <- optim.pml(fit, rearrangement="NNI") fit.ini <- pml(treeNJ, dat) fit.ini
{ "domain": "bioinformatics.stackexchange", "id": 1440, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, phylogenetics, phylogeny, phangorn", "url": null }
quantum-mechanics, thermal-radiation, wavelength With this in mind, note that, in general, in thermal equilibrium without particle-number conservation, the number of particles $n(E)$ occupying states with energy $E$ is proportional to a Boltzmann factor. To be precise: $$ n(E) = \frac{g(E) e^{-\beta E}}{Z} $$ Here $g(E)$ is the number of states with energy $E$, $\beta = \frac{1}{kT}$ where $k$ is the Boltzmann constant, and $Z$ is the partition function (i.e. a normalization factor). The classical result for $n(E)$ or equivalently $n(\lambda)$ diverges despite the exponential decrease of the Boltzmann factor because $g(E)$ grows unrealistically when the quantization of energy levels is not accounted for. This is the so-called ultraviolet catastrophe.
{ "domain": "physics.stackexchange", "id": 6911, "lm_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, thermal-radiation, wavelength", "url": null }
uniprot Location: https://rest.uniprot.org/uniprotkb/A2Z669.fasta [following] --2023-12-10 16:21:46-- https://rest.uniprot.org/uniprotkb/A2Z669.fasta Reusing existing connection to rest.uniprot.org:443. HTTP request sent, awaiting response... 200 OK Length: 314 [text/plain] Saving to: ‘A2Z669.fasta.1’
{ "domain": "bioinformatics.stackexchange", "id": 2626, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "uniprot", "url": null }
superconductivity, bose-einstein-condensate, second-quantization Title: Bogoliubov-de-Gennes (BdG) formalism Suppose you treat the mean-field BCS superconductor Hamiltonian $H$ in "BdG style" by re-writing it as $H = \frac{1}{2} \sum_k \psi_k^{\dagger} H_{BdG} \psi_k$ where, in terms of original annhiliation and creation operators appearing in $H$, $\psi_k = ( a_{k, u}, a_{k, d} , a_{-k, d}^{\dagger} , -a_{-k, u}^{\dagger} )^T$. Here $u$ and $d$ suggest up and down spin. The eigenvalues of $H$ can be found by finding eigenvalues of $H_{BdG}$. But, how to find the eigenvectors of original Hamiltonian $H$ from knowledge of $H_{BdG}$? What is general prescription? When you diagonalize $H_\text{BdG}$, you find the eigenvalues and the eigenvectors. Let us assemble these (column) vectors into a unitary matrix $U$ (this is always possible since $H_\text{BdG}$ is Hermitian), so that $U^\dagger H_\text{BdG} U=E$ is diagonal (i.e. the eigenvalues). Define $\Gamma_k = U^\dagger \psi_k$, then $ H=\frac{1}{2} \Gamma_k^\dagger E \Gamma_k $
{ "domain": "physics.stackexchange", "id": 29132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "superconductivity, bose-einstein-condensate, second-quantization", "url": null }
ros, c++, tf2, srdf, transform /* set the poseStamped to required position */ object_to_world_transform = tfBuffer.lookupTransform("world", "object_link", ros::Time(0)); tf2::doTransform(scan_object, scan_object, object_to_world_transform); move_group.setPoseTarget(scan_object.pose); move_group.move(); After these transforms, the pose in scan_object is the one I need the robot to move to (world,tool0). But problems arise when I try to move a camera_frame that is at the end of the robot. My idea of how it would work was, that I would find the transformation between the object and camera(object,camera). Set the PoseStamped to the required position. Then transform it to (world,tool0). object_to_camera_transform = tfBuffer.lookupTransform("object_link", "camera", ros::Time(0), ros::Duration(1.0)); /* convert object_to_camera_transform to poseStamped and set it to required position */
{ "domain": "robotics.stackexchange", "id": 36231, "lm_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, c++, tf2, srdf, transform", "url": null }
c, file On the other hand, some people find this writing style potentially error prone or confusing. In my opinion code duplication is the bigger evil, so I still prefer this writing style, which is also shorter. Comments stating the obvious // open the file: int fd = 0; fd = open(fileName,O_RDONLY); Is that comment really necessary there? Or is it just noise? Pointless variable initialization int fd = 0; fd = open(fileName,O_RDONLY); If you're going to set fd to something else, why set it to 0? Usability When you run the program, it prints nothing, it's just waiting for user input. It would be better to print a prompt, for example: puts("Enter file name:");
{ "domain": "codereview.stackexchange", "id": 13838, "lm_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", "url": null }
compilers Title: Is this a syntax error or a semantic error? I came across the following question The error in the expression " if x>y x=2; " is detected by a. Syntax analyzer b. Lexical analyzer c. semantic analyzer I know that the parentheses of x>y are missing, but it is not syntax error right? as all the syntaxes are correct, but we are missing a pair of parenthesis.. so is this a semantic error? The correct answer is given as a. As vonbrand points out, the lexical/syntactic/semantic division is artificial. We use it because it's convenient, but languages can easily blur the lines. The most substantial division in the set is between lexical/syntactic errors and semantic errors. Lexical and syntactic errors can be identified by logical operations on the text of your program itself, while semantic errors are cases where the program doesn't do what you meant it to do. For example: if (x); y();
{ "domain": "cs.stackexchange", "id": 14270, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "compilers", "url": null }
c#, geospatial double t = T((double)coordinates.x * Mathf.Deg2Rad); double r = R(t); double angle = N * ((double)coordinates.y * Mathf.Deg2Rad - originLongitude); Vector2 lambertCoord = new Vector2 { x = (float) (r * System.Math.Sin(angle)), y = (float) (ROrigin - r * System.Math.Cos(angle)) }; return lambertCoord; } public const double lowerLatitude = 49.8333333 * Mathf.Deg2Rad; Huh? Mathf.Deg2Rad is a float. Either use Math.PI / 180 or change the type of lowerLatitude to float, but don't work with low-precision values and then implicitly claim that the result is high-precision. static double MLower { get => M(lowerLatitude);} This (and all the other similar lines) is weird. I can understand using the old-style static double MLower { get { return M(lowerLatitude); } } or the new-style static double MLower => M(lowerLatitude); but the only reason I can see to use the hybrid form is if there's also a setter.
{ "domain": "codereview.stackexchange", "id": 35026, "lm_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#, geospatial", "url": null }
c, io, child-process, unix Are there any issues I'm overlooking with them? There might be good use cases for goto, but this is not one of them. It's best when code reads from top to bottom. The goto statements break that readable flow. Since the jump-to labels are quite far, I'm forced to scroll to the end to see what they do. After I scrolled, I find some code using variables defined at the beginning, which I haven't memorized earlier, so now I have to go back to top. Effectively I'm making several jumps back and forth to understand how this works, and then a few more jumps to verify carefully that it should work well. This is a nightmare, and it doesn't have to be. If you replace the goto statements with the code at their jump-to labels, the code becomes: if (pipe(in)) { return -1; } if (pipe(out)) { close(in[0]); close(in[1]); return -1; } if (pipe(err)) { close(out[0]); close(out[1]); close(in[0]); close(in[1]); return -1; }
{ "domain": "codereview.stackexchange", "id": 10939, "lm_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, io, child-process, unix", "url": null }
Fujitsu Halcyon Service Manual, Postgraduate Certificate In Workplace Wellness Trinity, Hibernia Oil Rig Location, Rubbermaid Shed 3752 Parts, Best Cancer Hospital In New York State, Work Study Diploma Phase 2, Afro Cuban All Stars - Distinto Diferente, Cherokee National Forest - Maps, Prize Fighter Lyrics, Are Murray River Turtles Endangered,
{ "domain": "hotexl.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918509356967, "lm_q1q2_score": 0.812727261909032, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 445.53768278060596, "openwebmath_score": 0.7381290793418884, "tags": null, "url": "http://hotexl.com/qlyur8j/4cd914-area-of-pentagon-formula" }
civil-engineering, geotechnical-engineering The depth at which the borehole initially finds the water table may be incorrect, an artifact of the drilling process itself. Therefore, if any changes to the water table level are observed, boring must be halted for a short while (10+ minutes) to let the table stabilize (and this must be included in the report). I've found a nice report (pdf) stored by the UK government which just so happens to explain this on page 7. It also has nice examples of borehole records (i.e. page 8) which indicate differing water levels over time.
{ "domain": "engineering.stackexchange", "id": 3268, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "civil-engineering, geotechnical-engineering", "url": null }
bioinformatics Title: Quantitative Comparisons of Phylogenetic trees I am working on a broad phylogenomic analysis of proteins involved in one particular cellular process. I have constructed a phylogenetic tree for each protein. I am now working on comparing those trees in order to extract categories (i. e., allele a of protein a occurs most frequently with allele b of protein b, etc.). I have attempted to construct a super tree using clann, but the tree is extremely difficult to interpret. I would therefore like to carryout a quantitative comparison (and subsequent categorisation) of each each tree, but it is unclear to me how to even begin this analysis. Is there a standardised method for comparison of phylogenetic trees? I don't know whether it's exactly what you need, but there are formal algorithms for tree comparison.
{ "domain": "biology.stackexchange", "id": 2393, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bioinformatics", "url": null }
c++, beginner, queue … is clearer than: auto q = queue<int>(5); … and there’s no reason it couldn’t be just as efficient. So that leaves you with just the default constructor (with optional allocator). But it’s still not noexcept so long as it’s allocating. So if you really want a noexcept default constructor (and you should!), you need to not do any allocating. How is that possible? Well, one option is to say that a default-constructed queue has a size of 0 and a capacity of 0, and thus m_RawData is nullptr: template <typename T, typename Allocator = std::allocator<T>> class queue { T* m_RawData = nullptr; std::size_t m_Size = 0; std::size_t m_Capacity = 0; [[no_unique_address]] Allocator m_alloc = {}; // ... [snip] ... public: constexpr explicit queue(Allocator const& alloc = {}) noexcept : m_Alloc{alloc} {} // ...
{ "domain": "codereview.stackexchange", "id": 40871, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, queue", "url": null }
general-relativity, black-holes, orbital-motion, rocket-science Title: What speed would a rocket below $1.5R_s$ require the least thrust to remain at constant radius? Take a rocket travelling in a circle at less than $1.5R_s$ away from a black hole. At that distance, no orbit is possible and the rocket must produce continuous force to stay outside the black hole. Travelling in a circle can reduce this force, but not eliminate it. In addition, if the rocket is travelling a near the speed of light, time dilation will cause the proper acceleration from the perspective of the rocket to be MUCH larger than from the perspective of a distant observer. At what speed will the required proper acceleration be minimised? blademan9999 asked: "At what speed will the required proper acceleration be minimised."
{ "domain": "physics.stackexchange", "id": 92408, "lm_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, black-holes, orbital-motion, rocket-science", "url": null }
pressure, water, air, fluid-statics Really, the limiting case will be where one side of the card remains tight against the cup, while the other side drops to take the entire change. On average this will double the height that might appear, so assume you really cause it to drop by a third of a millimeter. Still not a problem.
{ "domain": "physics.stackexchange", "id": 48625, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pressure, water, air, fluid-statics", "url": null }
c++, c++17, rock-paper-scissors, rags-to-riches However, selecting a single item at random from within a collection is a very common need. A more generally useful way to write this might be this: template <typename Iter> Iter random_one(Iter begin, const Iter& end) { static std::random_device rd; static std::mt19937 gen{rd()}; static std::uniform_int_distribution<> dis(0, std::distance(begin, end) - 1); std::advance(begin, dis(gen)); return begin; } Now we can get an iterator that points to a particular item in any collection. (To make this template more durable, we'd actually probably want to do some validation of both the Iter type and the values passed, but this conveys the idea.) We could use that with no further modifications as in this: RockPaperScissors RockPaperScissors::random() { auto which = std::distance(words.begin(), random_one(words.begin(), words.end())); return RockPaperScissors{which}; }
{ "domain": "codereview.stackexchange", "id": 36790, "lm_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++17, rock-paper-scissors, rags-to-riches", "url": null }
# Limit of $f(x)$ given that $f(x)/x$ is known Given that $$\lim_{x \to 0} \dfrac{f(x)}{x}$$ exists as a real number, I am trying to show that $\lim_{x\to0}f(x) = 0$. There is a similar question here: Limit of f(x) knowing limit of f(x)/x. But this question starts with the assumption of $$\lim_{x \to 0} \dfrac{f(x)}{x} = 0,$$ and all I am assuming is that the limit is some real number. So the product rule for limits doesn't really work here. Or do I need to show that $$\lim_{x \to 0} \frac{f(x)}{x} = 0$$ and then apply the product rule?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226314280634, "lm_q1q2_score": 0.8621519915974478, "lm_q2_score": 0.8824278618165526, "openwebmath_perplexity": 301.70757531191634, "openwebmath_score": 0.907375156879425, "tags": null, "url": "https://math.stackexchange.com/questions/2891882/limit-of-fx-given-that-fx-x-is-known/2891884" }
newtonian-mechanics Why does the handle go 126 inches when it traverses the jack once? How exactly would we use the pulleys and the weight $W$? It's hard for me to picture this. I can only imagine a person pushing the handle with their hands. You have a good answer from ad2004 explaining that the handle's 20 inch radius equals an approximately 126 inch circumference. As for the weight and pulleys question, it is to demonstrate that a 1.6 pound force would move the handle. Suppose that the 20 inch horizontal handle was replaced with a horizontal 20 inch radius pulley. Now attach a string to the edge of the pulley, wrap it around the pulley 10 times, then run it over a fixed vertical pulley, and attach a 1.6 pound weight to the string. Ideally, the weight puts 1.6 pounds tension on the string to rotate the horizontal pulley 10 times as the weight lowers. This is one way of doing it, I hope it will help your understanding of the question.
{ "domain": "physics.stackexchange", "id": 73465, "lm_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", "url": null }
sun, plasma-physics, kinetic-theory, viscosity Title: What is the viscosity of Sun surface? It should be possible to compute value from hydrodynamics of Solar prominence. What is the current estimate of Solar surface viscosity? What is the viscosity of Sun surface?
{ "domain": "physics.stackexchange", "id": 43867, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sun, plasma-physics, kinetic-theory, viscosity", "url": null }
If you call $$a_k=E[N_k]$$ then you end up with a linear induction relation: $$a_k-6a_{k-1}=6$$ Since it is linear, it solves as the sum of general solution of homegenous equation $$H_k-6H_{k-1}=0$$, which is $$H_k=6^kH_0$$ and one particular solution of the full equation. The theory says that if the RHS is of the form $$P(k)r^k$$ then you can find a particular solution of the form $$Q(k)r^k$$ with $$\deg(Q)=\deg(P)+m$$ where $$m$$ is the multiplicity of the root of the homogenous equation. In this case $$RHS = 6\times 1^k$$ and the single root of homogenous equation is $$r=6$$. So the multiplicity of $$1$$ is just $$m=0$$ (i.e. not a root) this means $$\deg(Q)=0+0=0$$. All that to say that our particular solution is simply a constant... Therefore let search for $$S_k=c$$ then $$c-6c=6\iff c=-\frac 65$$ Our general solution is then $$a_k=H_k+S_k=6^kH_0-\frac 65$$ We now solve for initial conditions: $$a_1=6=6H_0-\frac 65\iff H_0=\frac 65$$ and we get $$E[N_k]=\frac 65(6^k-1)$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429595026213, "lm_q1q2_score": 0.8578166458669823, "lm_q2_score": 0.8723473713594992, "openwebmath_perplexity": 160.1771235935303, "openwebmath_score": 0.7783046364784241, "tags": null, "url": "https://math.stackexchange.com/questions/4106228/is-there-a-general-procedure-for-inducing-a-formula-recognizing-a-pattern/4106329" }
for ( int n = 1; n <= 10; n++) { Console.WriteLine("{0} {1} {2} {3}", n, n*n, n*n*n, Math.Sqrt(n)); } The numbers will be there, but the output is not pretty: 1 1 1 1 2 4 8 1.4142135623731 3 9 27 1.73205080756888 4 16 64 2 5 25 125 2.23606797749979 6 36 216 2.44948974278318 7 49 343 2.64575131106459 8 64 512 2.82842712474619 9 81 729 3 10 100 1000 3.16227766016838 First we might not need all those digits in the square root approximations. We can replace {3} by {3:F4} to just show 4 decimal places. We can adjust the spacing to make nice columns by using a further formatting option. The longest entries are all in the last row, where they take up, 2, 3, 4, and 6 columns (for 3.1623). Change the format string: for ( int n = 1; n <= 10; n++) { Console.WriteLine("{0,2} {1,3} {2,4} {3,6:F4}", n, n*n, n*n*n, Math.Sqrt(n)); } and we generate the neater output:
{ "domain": "luc.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9621075744568837, "lm_q1q2_score": 0.8058805151391539, "lm_q2_score": 0.8376199673867852, "openwebmath_perplexity": 1145.4260112249117, "openwebmath_score": 0.3354646563529968, "tags": null, "url": "http://books.cs.luc.edu/introcs-csharp/for/forexamples.html" }
X=new_data
{ "domain": "datascience-enthusiast.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399069145609, "lm_q1q2_score": 0.8085247777851516, "lm_q2_score": 0.8333245953120234, "openwebmath_perplexity": 883.048552434312, "openwebmath_score": 0.5889258980751038, "tags": null, "url": "https://datascience-enthusiast.com/R/logistic_regression.html" }
fft, frequency-spectrum, dft, aliasing No, subsampling in frequency domain corresponds to aliasing in time domain. So the idea here is to purposefully alias in time domain so that you get a sub-sampled FFT. That is exactly why 'Claim 3.7' of paper mentions $y_i=\sum_{j=0}^{n/B-1}x_{i+Bj}$. These are $n/B$ copies of $x[n]$ shifted by $B$ and overlapped. Each copy is positioned at $0,B,2B,\ldots,(\frac{n}{B}-1)B$. This aliased signal can be used to compute FFT ($B\log_2 B$ operations) to arrive at subsampled FFT. Total number of operations will the operations need to create the aliasing (summing of non-zero values of $x$ which equals $O(\text{supp}(x))$ in addition to the operation needed to compute FFT of aliased $x$ ($O(B\log_2 B)$).
{ "domain": "dsp.stackexchange", "id": 8770, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, frequency-spectrum, dft, aliasing", "url": null }
automata-theory, context-free Title: Are endmarkers necessary for Deterministic Pushdown Automata? In the book by Kozen (Automata and Computability), the transition function of deterministic pushdown automata (DPDAs) is supposed, in contrast with non-deterministic pushdown automata (NPDAs), to accept as arguments triples $(q, \sigma, \gamma)$ with $\sigma$ that might be a right endmarker symbol. It is written: "The right endmarker delimits the input string and is a necessary addition. With NPDAs, we could guess where the end of the input string was, but with DPDAs we have no such luxury." (p. 176). Can we show that this condition is necessary? Can we give an example of a language accepted by this kind of DPDA's that is not accepted by any DPDA whose transition function has no argument with an endmarker? Short answer: it depends on how you set the acceptance condition of the DPDA model: final state or empty stack.
{ "domain": "cstheory.stackexchange", "id": 4797, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata-theory, context-free", "url": null }
electromagnetism, electrostatics For a homogeneous ($\chi$ not depending on position) linear anisotropic substance, we know $\partial_n \epsilon^{ik} = 0$ and so we can confidently discard that first term. The second term is trickier, but there will be certainly some basis which diagonalizes $\epsilon^i_j = e^{i} ~ \delta^i_j$, and it will usually be the crystal basis, so you will still have the expression $\epsilon^j ~ g^{jk} ~ \partial_j ~ \partial_k \phi ~=~ \epsilon^j ~ \partial_j ~ \partial^j \phi = 0.$ In general it looks like this expression will "tweak" the $\epsilon^j$ coefficients with the metric before they enter into an equation substantially similar to yours. If the material is non-homogeneous then of course the first term in the above expression is some vector field $t^k = \partial_i (\epsilon^i_j g^{jk})$ which also contributes a $(\vec t \cdot \nabla) \phi$ term to the mix.
{ "domain": "physics.stackexchange", "id": 20299, "lm_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, electrostatics", "url": null }
python, python-3.x All of the menu information should be defined in one place. You can programmatically generate the ASCII table using the astropy.io.ascii package, but I've put together a quick-and-dirty implementation below. The if statements in the loop should be replaced by a dictionary lookup. Furthermore, is is the wrong operator to use; string comparison should be done using ==. In fact, entering "done" doesn't correctly end the loop, because of that. You used + str(0) as a hack to get a price ending in "0" to display properly. To represent fixed-point numbers, you should use a Decimal instead. This program is long enough that it would be a good idea to make a main() function. Statements should generally not be terminated with semicolons in Python. Also, PEP 8, the official style guide, specifies that indentation should be four spaces. This is an important convention in Python, where indentation matters a lot. Suggested solution from collections import OrderedDict, namedtuple
{ "domain": "codereview.stackexchange", "id": 32194, "lm_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 }
You and your brother essentially applied the axiom of Archimedes and arrived at the generally accepted conclusion. For any positive ε in K, there exists a natural number n, such that 1/n < ε. You chose the natural number 10 (adding an extra zero in the decimal place before a number) and your brother chose 2. Although, asmeurer rightly points out that it is not proper to say “put an infinite amount of zeroes in the decimal place before a number”. While it has proven useful to give infinity a name and a symbol (∞), the same can’t be said about the thing that is an infinitesimal positive distance from zero. You should take away these two points: 1. The thing that is an infinitesimal positive distance from zero is not a real number. 2. There is no name or symbol for the thing that is an infinitesimal positive distance from zero. But go ahead and call it a number and give it a name and a symbol. If you want to.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9572778000158576, "lm_q1q2_score": 0.8136585316533212, "lm_q2_score": 0.8499711699569787, "openwebmath_perplexity": 553.7158394153515, "openwebmath_score": 0.6957710385322571, "tags": null, "url": "https://math.stackexchange.com/questions/1892005/is-there-such-thing-as-a-smallest-positive-number-that-isnt-zero/1892203" }
I am not sure that this is the intended solution though • Is it explicitly stated that $a$ and $b$ are positive? – Dan Aug 26, 2022 at 18:22 • Yeah sorry for not stating that in the original question Aug 26, 2022 at 18:58 Here is the intended solution (this is from a Junior Balkan Mathematical Olympiad TST of Bulgaria). By repeated use of AM-GM, $$\frac{a^2+b^2}{2a^5b^5} + \frac{81a^2b^2}{4} + 9ab \geq \frac{2ab}{2a^5b^5} + \frac{81a^2b^2}{4} + 9ab = \frac{1}{a^4b^4} + \frac{81a^2b^2}{4} + 9ab = \frac{1}{a^4b^4} + \frac{81a^2b^2}{4} + \frac{9ab}{2} + \frac{9ab}{2} \geq 4 \sqrt[4]{\frac{9^4}{2^4}} = 18$$ For equality to hold, we must have $$a=b$$, $$\frac{9ab}{2} = \frac{81a^2b^2}{4}$$ and $$\frac{9ab}{2} = \frac{1}{a^4b^4}$$, which is not possible. I did not know before that there is a simple AM-GM solution which gives a better integer constant than $$18$$, so nice work!
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126488274565, "lm_q1q2_score": 0.8259308073112059, "lm_q2_score": 0.8438950986284991, "openwebmath_perplexity": 279.347959986042, "openwebmath_score": 0.9527207016944885, "tags": null, "url": "https://math.stackexchange.com/questions/4519399/i-cant-come-up-with-the-intended-solution-to-fraca2b22a5b5-frac8" }
$$\int_{0}^{\infty} \frac{\cosh(ax)}{\cosh(\pi x)} dx= \frac{1}{2} \int_{- \infty}^{\infty} \frac{\cosh(ax)}{\cosh(\pi x)} dx$$ Next I proceed by the standard procedure $$\oint_C f(z) \,dz=(\int_{C_{R}}^{}+\int_{C_{T}}^{}+\int_{C_{L}}^{}+\int_{C_{B}}^{})f(z)dz=2 \pi i \sum_{j}\text{Res}(f(z);z_j)$$ where $f(z)=\frac{\cosh(az)}{\cosh(\pi z)}$ and R, T, L, and B denote the right, top, left, and bottom sides of the rectangular contour. Furthermore, I can bound each $C_i$ integral and determine what happens as R approaches $\infty$ to ultimately simplify the above expression. In fact, the side contour integrals do disappear as R approaches $\infty$, and the bottom integral becomes our integral of interest. $$\oint_C f(z) \,dz=(\int_{C_{T}}^{}+\int_{C_{B}}^{})f(z)dz=2 \pi i \sum_{j}^{}\text{Res}(f(z);z_j)$$ However, I am left clueless as to how to deal with the top integral. • Just note that the integrand is an even function! – Mhenni Benghorbal Apr 13 '16 at 2:18
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471689667877, "lm_q1q2_score": 0.8043683294495079, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 506.74156370037764, "openwebmath_score": 0.9797482490539551, "tags": null, "url": "https://math.stackexchange.com/questions/1740054/show-that-int-0-infty-frac-coshax-cosh-pi-x-dx-frac12-sec" }
php, http, session, i18n Title: Language-detection PHP script I'm working on a webpage with language detection and I have the following script so far (it's simple). I still haven't done the user detection, so it's not available to find the user language (yet), but this will be easily implemented. Though I'm not asking for that, I'm asking for other ways to improve this code. So far as I've tested it, it's bug-free, but I want it to be bulletproof. How can I improve or expand it? //LANGUAGES //Language detection if ( !empty($_POST['lang']) ) { $Lang = $_POST['lang']; $_SESSION['lang']= $_POST['lang']; } else { if ( !empty ($_SESSION['lang'])) $Lang = $_SESSION['lang']; else $Lang = substr ($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); }
{ "domain": "codereview.stackexchange", "id": 1341, "lm_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, http, session, i18n", "url": null }
ros-melodic +100 for sharing your document, but as I wrote in my answer, sudo apt install ros-melodic-industrial-core should just work, as the package has been released. Building from source is not necessary. See status_page/ros_melodic_default.html?q=industrial_core. Same for ABB. Only abb_experimental needs to be built from source, as it is an experimental repository and does not get released. Comment by AlexCC on 2020-04-14: Yes! I forgot to mention that, ahmed ali... However that is also included in the document. There is an "UPDATE" part which explains about this. Please read the whole document before installing something. Comment by gvdhoorn on 2020-04-14:\
{ "domain": "robotics.stackexchange", "id": 32520, "lm_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-melodic", "url": null }
kinematics, acceleration, velocity Conclusion, it makes sense to smooth (e.g., simple averaging) a velocity signal (temporal velocity), but it does not make so much sense to do smoothing on acceleration signal. Am I right? As far as we know and can test, space is continuous, not discrete. Since space is continuous, then the labels we associate with it (i.e., positions) are also continuous. Calculus requires continuous functions to do the derivative and integral, so this implies that velocities and accelerations are also continuous because they are derivatives of positions: $$ v(t)=\frac{dx(t)}{dt}\qquad a(t)=\frac{dv(t)}{dt}=\frac{d^2x(t)}{dx^2} $$ If you have a discrete spectrum (e.g., measurements at different times/positions), then interpolation (whether linear or some higher-order method) is a necessary and useful tool to reconstruct the smooth distribution that we expect.
{ "domain": "physics.stackexchange", "id": 18210, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, acceleration, velocity", "url": null }
fft, dft, frequency-domain Title: How do I perform a time domain phase shift in the frequency domain? I've seen some information on this topic around, but I don't quite understand it. I have a time domain signal. I understand that if I want to time shift this signal, I can do so by multiplying its Fourier transform by $\exp(-j\omega\delta t)$, where $\delta t$ is the time delay. However, what if I want to introduce a phase shift in the time domain signal? What would I multiply its Fourier transform by? Or do I have to do this transformation in the time domain?
{ "domain": "dsp.stackexchange", "id": 10232, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, dft, frequency-domain", "url": null }
deep-learning, keras, tensorflow, text, text-classification Title: Need for Dense layer in Text Classifcation While creating a model for text classification, what is the need for a Dense Layer? I noticed in multiple examples the following is the structure. A softmax is what required right instead of the Dense Layer? model = tf.keras.Sequential([ tf.keras.layers.Embedding(encoder.vocab_size, 64), tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(64)), tf.keras.layers.Dense(1) ]) Consider the following sentence in 5 class classification: "movie is good" . The model structure could be: a = activation_unit emb= embedding_vector(word) a0 -> emb("movie") ->a1->emb("is") ->a2->emb("good") ->a3, and sample_y = softmax(np.dot(Wya,a3)) and sample_y = [0.1,0.2,0.2,0.4,0.1]
{ "domain": "datascience.stackexchange", "id": 7699, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-learning, keras, tensorflow, text, text-classification", "url": null }
OpenGL is an interesting case in that regard. When GL was initially created, the developers chose the row-major vector convention. Developers who extended OpenGL though thought they should go back to to column-major vector which they did. However for compatibility reasons, they didn't want to change the code for the point-matrix multiplication and decided instead to change the order in which the coefficients of the matrix were stored in memory. In other words OpenGL stores the coefficients in column-major order which means that the translation coefficients m03, m13 and m23 from a matrix using column-major vector have indices 13, 14, 15 in the float array as would the translation coefficients m30, m31 and m32 from a matrix using row-major vector. XX explain here that the translation coeff in column major matrix are at 03 13 23 XX Add picture? XX. Summary The differences between the two conventions are summarised in the following table:
{ "domain": "scratchapixel.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787846017969, "lm_q1q2_score": 0.80478021135912, "lm_q2_score": 0.8152324826183822, "openwebmath_perplexity": 921.7886747497524, "openwebmath_score": 0.6234551668167114, "tags": null, "url": "http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-4-geometry/conventions-again-row-major-vs-column-major-vector/" }
homework-and-exercises, newtonian-mechanics, classical-mechanics, spring Title: Minimum separation distance between two masses cushioned by a spring I think this problem is much more difficult than what I've learned so far.
{ "domain": "physics.stackexchange", "id": 11383, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, classical-mechanics, spring", "url": null }
neural-network, deep-learning, keras, tensorflow This is why I would like to hear your opinion on that. Am I doing something completely wrong or is my assumption that ANNs are especially good for such input-output mapping in this case just not true? Or maybe there is an issue with the training data? I'd highly appreciate any comments and advice from you because I do not know what else to do. Here you can see the code: # For data manipulation import numpy as np import pandas as pd
{ "domain": "datascience.stackexchange", "id": 9202, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-network, deep-learning, keras, tensorflow", "url": null }
energy-conservation, projectile, kinematics $$\bar v = \frac{v+0}{2} = \frac v2 $$ So we have $$h=\bar v\cdot t = \frac v2\cdot t = \frac v2\cdot \frac vg = \frac{v^2}{2g}$$ The factor of $1/2$ came from the need to calculate the average velocity and the average of two numbers is one-half ($1/2$) of their sum. I don't need any kinetic energy to do the calculation, as you can see. But the factor $1/2$ in the formula for the kinetic energy $E=mv^2/2$ has a totally analogous origin: it is the total work you have to do to accelerate the object from velocity $v=0$ to velocity $v$. The force one has to overcome is $F=ma$ and the work is $F\cdot \Delta x$ but $\Delta x=\bar v \cdot t = (0+v)t/2$ so we have $$ E = ma\cdot x = ma\cdot vt/2 = mv^2/2$$ where I used $v=at$ because the velocity was assumed to increase uniformly again. Once again, I calculated the average velocity which turned out to be $1/2$ of the maximal (final) one.
{ "domain": "physics.stackexchange", "id": 89184, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy-conservation, projectile, kinematics", "url": null }
r, tools, rstudio, programming Tinn-R - Tinn-R Editor - GUI for R Language and Environment R AnalyticFlow - data analysis software that utilizes the R environment for statistical computing. Rgedit - a text-editor plugin. Nvim-R - Vim plugin for editing R code. Rattle - A Graphical User Interface for Data Mining using R. How to Turn Vim Into an IDE for R
{ "domain": "datascience.stackexchange", "id": 7641, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, tools, rstudio, programming", "url": null }
electromagnetism Title: What is the difference between north and south magnetically? Is there a reason that magnetic field lines are drawn from north to south or is this a purely arbitrarily defined protocol (for convenience)? Essentially what I am asking is: without a reference magnet (like the earth) is there a way determining what pole of a magnet is north and which is south? Lagerbaer's comment is correct: you can tell which way the magnetic field vectors point (i.e., which end of your bar magnet is "north") using a moving charge rather than a reference magnet.
{ "domain": "physics.stackexchange", "id": 1014, "lm_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", "url": null }
php, optimization, object-oriented, controller // validate all signee's inputs $v->validate('firstname', $signee['firstname']); $v->validate('lastname', $signee['lastname']); $v->validate('email', $signee['email']); $v->validate('cfmEmail', $signee['cfmEmail']); $v->validate('password', $signee['password']); $v->validate('terms', $signee['terms']); // if signee's data passed the validation, safe to TRY and register the user if (!$v->getErrors()) { try { $this->userService->signUp( //this method will throw an exception if anything exceptional happens $signee['firstname'], $signee['lastname'], $signee['email'], $signee['password'] );
{ "domain": "codereview.stackexchange", "id": 8492, "lm_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, optimization, object-oriented, controller", "url": null }
numerical-analysis, computer-algebra The main one is probably that maybe you haven't had the need to solve problems in which they are needed, yet, and that the problems, like finding a solution of a system of polynomial equations. are more efficiently done by algorithms that target exactly that problem, like Newton's method. Groebner bases can end up with large degrees for systems with relatively few variables and degrees larger than one.
{ "domain": "cs.stackexchange", "id": 17965, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "numerical-analysis, computer-algebra", "url": null }
energy, schroedinger-equation Title: Meaning of $E$ in time-independent Schrödinger's Equation (high school) I've just learned the time-independent Schrödinger's equation as $$-\frac{\hbar^2}{2m}\cfrac{d^2\psi(x)}{dx^2}+V(x)\psi(x)=E\psi(x).$$ Does $E\psi(x)$ mean that $E$ is a constant (that the kinetic energy of a particle is constant) or is $E\psi(x)$ a separate function of $x$? Your equation is indeed the time independent Schrödinger Equation for a single particle in one dimension ($x$). Yes, $E$ is the total energy of the particle. To better appreciate this abstract looking equation, students are often taught the so-called Particle in a Box, system. Here's a good text dealing with that system.
{ "domain": "physics.stackexchange", "id": 53944, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, schroedinger-equation", "url": null }
javascript, strings Working Code: const result = `Consider using ${alternatives .map((alternative) => { return Array.isArray(alternative) ? alternative.map((a) => `'${a}'`).join(' with ') : `'${alternative}'`; }) .join(', ') .replace(/, ([^,]*)$/, ' or $1')} instead.` Remove the last item You are not going to avoid the stepping over each item at least once. However the replace and be avoided by removing the last item. One iteration Use a for loop, building the string as you step over each item. Before the loop pop the last item, then after the loop push it back to keep the array intact. You can then add the last item after the conjunction. I will use options rather than alternatives as in the bottom example it is more semantically fitting. function toHumanReadable(options) { const toStr = opt => `"${Array.isArray(opt) ? `${opt[0]}" with "${opt[1]}` : opt}"`;
{ "domain": "codereview.stackexchange", "id": 34233, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, strings", "url": null }
c++ return mouseMove; } float gizmo_drag_sensitivity_factor = 0.1f; // Dragging state variables bool dragging_gizmo = false; Vector2 mouse_drag_start = { 0, 0 }; float GetModelHeight(Model model) { BoundingBox modelBBox = GetMeshBoundingBox(model.meshes[0]); float modelHeight = modelBBox.max.y - modelBBox.min.y; return modelHeight; } float GetExtremeValue(const Vector3& a) { return std::max(std::max(std::abs(a.x), std::abs(a.y)), std::abs(a.z)); } bool IsMouseHoveringModel(Model model, Camera camera, Vector3 position, Vector3 rotation) { float x = position.x; float y = position.y; float z = position.z; //std::cout << "X: " << x << " y: " << y << " z: " << z << std::endl; float extreme_rotation = GetExtremeValue(rotation); Matrix matScale = MatrixScale(1, 1, 1); Matrix matRotation = MatrixRotate(rotation, extreme_rotation*DEG2RAD); Matrix matTranslation = MatrixTranslate(x, y, z);
{ "domain": "codereview.stackexchange", "id": 44378, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++", "url": null }
$\def\CC{\mathbb{C}}$The specturm is integral. The following trick is very useful in computing spectra of highly symmetric graphs. Let $G$ be a finite graph, let $\Gamma$ be a group of symmetries of $G$, and let $V$ be the set of vertices of $G$. Let $A$ be the adjacency matrix, so $A : \CC^V \to \CC^V$. Then $A$ commutes with the action of $\Gamma$ on $\CC^V$. Therefore, if $\CC^V = \bigoplus W_i$ is the decomposition of $\CC^V$ into isotypic summands, then the spectrum of $A$ is the disjoint union of the spectra of $A$ restricted to the $W_i$. In our case, we'll take $\Gamma = (\mathbb{Z}/k)^n$. For $(g_1, \ldots, g_n) \in \Gamma$ and $(x_1, \ldots, x_n)$ in $G_{n,k}$, we have $\left( (g_1, \ldots, g_n) \ast (x_1, \ldots, x_n) \right)_j = 0$ if $x_j=0$ and $\left( (g_1, \ldots, g_n) \ast (x_1, \ldots, x_n) \right)_j = g_j+x_j \bmod k$ if $x_j \neq 0$.
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290913825541, "lm_q1q2_score": 0.8071471989683195, "lm_q2_score": 0.831143054132195, "openwebmath_perplexity": 275.4533687515774, "openwebmath_score": 0.911478579044342, "tags": null, "url": "http://mathoverflow.net/questions/159022/how-can-i-prove-that-a-particular-family-of-graphs-is-integral" }
ros, joint, ros-hydro Comment by ignacio on 2020-12-10: remember to run sudo apt update, just in case
{ "domain": "robotics.stackexchange", "id": 17426, "lm_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, joint, ros-hydro", "url": null }
python, beginner, python-3.x, file-system f_n = (open('names.txt')).read() to with open('names.txt', 'r') as r: f_n = r.read().splitlines() You can drastically improve the readability of a multi-line string using triple-quotes. menu = "\n - Insert name to logg in \n - ADD to save new user \n - LIST to see saved users \n - REMOVE to delete a user \n - EXIT to finish \n ..." to menu = """\ - Insert name to log in - ADD to save new user - LIST to see saved users - REMOVE to delete a user - EXIT to finish ... """ You do not need to assign an input statement to a variable in order for it to pause the program until the user presses ENTER. nxt = input('Welcome, press enter to continue \n') if nxt == '': break to input('Welcome, press enter to continue \n') Since the continue isn't necessary, as none of the elif statements will execute if the program reaches that point anyway. Also, there is no need to use .close(), as the file handler does it for you:
{ "domain": "codereview.stackexchange", "id": 40056, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, file-system", "url": null }
Since you are concerned only with rectangular patterns, you have four digit numbers in a certain base $l$, and you want to check divisibility by $11$, where $11 = l+1$. When you have a four digit number in base $l$, write it as $al^3 + bl^2 + cl + d$, where $0 \leq a,b,c,d < l$. (This represents the $l$-base number $\overline{abcd}$). Now, we have a cute fact : $l^3 + 1$ is a multiple of $l+1$, since $l^3+1 = (l^2 - l + 1)(l+1)$. Furthermore, $l^2 - 1 = (l-1)(l+1)$. Therefore, we make the following rewrite : $$al^3 + bl^2 + cl + d = a(l^3 + 1) + b(l^2 - 1) + c(l+1) - (a - b + c - d) \\ = (l+1)(...) + ((b+d)-(a+c))$$ where $l+1 = 11$ in base $l$. Therefore, the remainder when $\overline{abcd}$ is divided by $11$ is $(b+d) - (a+c)$. When you consider four numbers ($1 \to 9$, since I found problems in the letters for hex) in a rectangle and form a four digit number out of them now, can you see why this number $(b+d) - (a+c)$ is in fact zero, therefore giving your desired result?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471642306268, "lm_q1q2_score": 0.8111445304034367, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 483.3908982244749, "openwebmath_score": 0.6681293249130249, "tags": null, "url": "https://math.stackexchange.com/questions/2922749/any-rectangular-shape-on-a-calculator-numpad-when-divided-by-11-gives-an-integer/2922762" }
$$N=2i$$ convention: • J.H. Negele & H. Orland, Quantum Many-Particle Systems, 1998. See e.g. eq. (1.124). -- $$^1$$ Note that $$z^{\ast}=x-iy$$ denotes the complex conjugate variable. It is not an independent complex variable. In particular, the integration (1) is over $$\mathbb{C}$$. It is not over $$\mathbb{C}^2$$. See also e.g. this Math.SE post, this Phys.SE post and links therein. • In practice, is there ever a way to "integrate over $z$ and $\bar{z}$ without switching to $x$ and $y$? – knzhou Feb 1 '17 at 18:09 • Yes. E.g. in the complex coherent state method. See e.g. this Math.SE post. – Qmechanic Feb 1 '17 at 19:36 • Could you link to a resource that does an explicit calculation in this formalism? For example, are the calculations here legitimate? – knzhou Feb 1 '17 at 19:39
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102571131692, "lm_q1q2_score": 0.820332710872827, "lm_q2_score": 0.8479677622198947, "openwebmath_perplexity": 213.03377512218367, "openwebmath_score": 0.9197180271148682, "tags": null, "url": "https://physics.stackexchange.com/questions/308929/what-is-the-meaning-of-the-double-complex-integral-notation-used-in-physics/308996" }
keras, loss-function, categorical-data, machine-translation It takes in a sequence of words encoded as integers, with 0 padding up to max_input_length. And outputs a one-hot-encoded version of the output for words up to max_output_length. For example, with a max ouput length of 115, and an expected output of length 20, the network should predict 20 integers in the range max_output_vocab, followed by 95 predicted 0's. My problem: I've been running into the issue that the network trains way too much off of the zero tokens in the output, as many of the target sequences have output lengths far below the max output length. The network ends up learning it can get the most accuracy by just predicting almost all 0's for most of the output. I want to try to make a custom loss function that won't train on any output that comes after the first 0 token, but I'm not sure how I would go about doing this properly.
{ "domain": "datascience.stackexchange", "id": 6371, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "keras, loss-function, categorical-data, machine-translation", "url": null }
python, machine-learning, neural-network, python-2.x def train(self, dataset): # some code here def process(self, dataset): # some code here # more methods as needed This would make the script importable, so you can reuse your neural net for various applications. In order to make it also executable, add a if __name__ == __main__ condition. This will be True if you execute your script, and False if you import it. You can use this to test or run your script while working on it. After the classes and function definitions, add something like this: if __name__ == 'main': nn = neural_network(1.0, 0.5) nn.add_neuron(neuron(1.0, 1.0, 1.0, 1.0)) nn.train("C:/taining data.csv") # your code goes here
{ "domain": "codereview.stackexchange", "id": 35927, "lm_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, machine-learning, neural-network, python-2.x", "url": null }
homework-and-exercises, newtonian-mechanics, rotational-dynamics, moment-of-inertia Focusing on the part with the parallel axis theorem, the book says $$I = 3.0\text{ kg m}^2 + 2(5\text{ kg})(1\text{ m})^2 = 13 \text{ kg m}^2$$ I have never seen the parallel axis theorem used this way. Since the $3\text{ kg m}^2$ is without the dumbbells how can you include it into the equation. From what I understand when the book derived the equation, the masses in both moments of inertia should be the same. Please help me figure out this part of the problem. Strictly speaking, this isn't the parallel axis theorem, but simply the addition of three moments of inertia about a common axis. $$\mathscr{I}_{total}=\mathscr{I}_{man/arms}+\mathscr{I}_{dumbell}+\mathscr{I}_{dumbell}$$
{ "domain": "physics.stackexchange", "id": 27120, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, rotational-dynamics, moment-of-inertia", "url": null }
programming-challenge, haskell Title: HackerRank Ransom Note, solved using Data.Map as a hash table I try to solve this hackerrank using Haskell but not sure if I use Data.Map corretly. Problem in brief: given 2 strings, magazine and note check if you can make note from words in magazine Here is my code, which passes all the tests. import Control.Applicative import qualified Data.Map as M readInts = map read . words <$> getLine :: IO [Int] main = do [a,b] <- readInts ms <- words <$> getLine ls <- words <$> getLine -- create magazine words table let mss = zip ms (repeat 1) let mms = M.fromListWith (+) mss -- create note words table let lss = zip ls (repeat 1) let lms = M.fromListWith (+) lss -- check for intersections, decrease wordcount for every intersection let dm = M.intersectionWith (-) mms lms -- see if any words need more than it avaliablity let a = M.filter (<0) dm -- print answer putStrLn $ if a == M.empty then "Yes" else "No"
{ "domain": "codereview.stackexchange", "id": 22864, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-challenge, haskell", "url": null }
c++, object-oriented, game, mvvm, sfml #include <fstream> #include <random> namespace bruglesco { static std::random_device rd; static std::mt19937 generator(rd()); static std::ofstream debuggStream("DebugLog.txt"); // remove for release constexpr unsigned screen_width = 1500u; constexpr unsigned screen_height = 800u; constexpr float menu_button_width = 256.f; constexpr float menu_button_height = 256.f; constexpr float play_button_x = 622.f; constexpr float play_button_y = 96.f; constexpr float six_button_x = 95.f; constexpr float eight_button_x = 446.f; constexpr float twelve_button_x = 797.f; constexpr float sixteen_button_x = 1148.f; constexpr float pair_button_y = 448.f;
{ "domain": "codereview.stackexchange", "id": 34697, "lm_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, game, mvvm, sfml", "url": null }
quantum-field-theory, spacetime, vacuum, discrete, loop-quantum-gravity Short answer is – no, the vacuum does not exist. The notion of energy does not exist as well (this is already apparent in GR with all of its energy paradoxes – it is possible to define gravitational energy only if GR is expanded around the flat space, which in turn excludes a lot of interesting solutions e.g. the cosmological FLRW solution). The dynamics of background independent theories is drastically different from anything else. It is in fact completely encoded in terms of constraints – for LQG this is the Hamiltonian constraint. It is expected (and in fact numerical simulations suggest this is true, see Rovelli's book for references) that among the solutions of the constraint there are those resembling classical geometries satisfying Einstein's equations. Among those, there should be the Minkowski space somewhere. In fact, there are two formulations of the Hamiltonian constraint operator that are presently known.
{ "domain": "physics.stackexchange", "id": 63461, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, spacetime, vacuum, discrete, loop-quantum-gravity", "url": null }
java, android, calculator // Saving textView1 as lastNumb String lastNumb = textView1.getText().toString(); // A substring of lastNumb String will be saved as lastIput // (lastnumb minus the click counter, till the last lastnumb) String lastInput = lastNumb.substring(lastNumb.length() - myClickCount, lastNumb.length()); // Parsing lastInput to into num2 integer num2 = Double.parseDouble(lastInput); // Parsing String of totalSum into tempSum integer tempSum = Double.parseDouble(totalSum.getText().toString());
{ "domain": "codereview.stackexchange", "id": 5940, "lm_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, android, calculator", "url": null }
bash, shell ### # need to make sure a file exists right away. touch $bashHistory ### ### doubles $HISTFILE contents # The if statement could be removed for always or never load yesterday. # Better yet changed to a flagable option. # # Yesterday is so long ago only load todays history minus 1 which gets loaded with bashory() # Since yesterday was recent lets make sure a file exists for then # Now only load yesterdays history # Then add todays minus 1 which gets loaded with bashory2() if [ $bnow = $bthen ]; then cat $bashHistory > $HISTFILE else touch ~/.bashory/archive/$bthen.bash_history cat ~/.bashory/archive/$bthen.bash_history > $HISTFILE cat $bashHistory >> $HISTFILE fi ### . ~/.bashory/bastory.bashory And ~/.bashory/bastory.bashory ### # This file is seperated to make sure # These function are correct during profile switching ### ### # Ensure verify is turned back on shopt -s histverify ###
{ "domain": "codereview.stackexchange", "id": 9135, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bash, shell", "url": null }
ros, library, ros-hydro Originally posted by gvdhoorn with karma: 86574 on 2014-08-19 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by Marcus on 2014-08-19: Alright, thanks, I guess it was always there, but not working the same way as on my other pc -->everytime I try to access the plugin for the hokuyo this way my node crashes :( But thanks again, Marcus Comment by gvdhoorn on 2014-08-19: Sounds like that is an issue for another question. This one is answered then? Comment by Marcus on 2014-08-19: Yup, this question was answered and I solved my other problem by choosing another lib (dunno why, but now it works). Anyways, thanks again and I flagged your response as an answer :)
{ "domain": "robotics.stackexchange", "id": 19103, "lm_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, library, ros-hydro", "url": null }
process-scheduling, multi-tasking The compiler needs a mode where it will never generate any instructions which involve the FPU. This ensures that the kernel and other system software never changes the FPU state implicitly. The CPU needs a mode or flag where it traps to the operating system when a FPU instruction is executed. This flag is set whenever the CPU context switches to a thread for which the FPU state is "stale", and the FPU state is switched if the trap happens. Note that while this optimisation "works", it has been the source of a Spectre-like security vulnerability on recent Intel CPUs, where it can leak information when the FPU operation is executed speculatively. But even without the full lazy FPU switch optimisation, this still allows saving and restoring FPU context only when a context switch actually occurs, rather than on every system call.
{ "domain": "cs.stackexchange", "id": 18550, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "process-scheduling, multi-tasking", "url": null }
$$\forall 0 < m < n \ : \quad \int_{0}^{\infty} \frac{x^{m-1}}{1+x^n} \, dx = \frac{\pi}{n}\csc\left(\frac{\pi m}{n}\right) \tag{1}$$ whose proof can be found here. Indeed, \begin{align*} I(n) &= \int_{0}^{\infty} \frac{\arctan(x^n)}{x^2} \, dx \tag{$x\mapsto 1/x$} \\ &= \left[-\frac{1}{x}\arctan(x^n) \right]_{x=0}^{x=\infty} + \int_{0}^{\infty} \frac{nx^{n-2}}{1 + x^{2n}} \, dx \tag{IbP} \\ &= n \cdot \frac{\pi}{2n}\csc\left(\frac{\pi (n-1)}{2n}\right) \tag{by (1)} \\ &= \frac{\pi}{2}\sec\left(\frac{\pi}{2n}\right). \end{align*} It is:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303425461246, "lm_q1q2_score": 0.8160774224630345, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 613.4352023261916, "openwebmath_score": 1.0000100135803223, "tags": null, "url": "https://math.stackexchange.com/questions/2661664/computing-int-0-infty-arctan-left-frac1xn-right-mathrmdx" }
beginner, validation, authentication, clojure, web-services First do isn't necessary, as body of function can contain several expressions instead of def inside function it's better to use let that allows to "define" several variables in one step, and they will visible only inside this let block. So 2nd & 3rd do could be replaced with corresponding let if variable is used only once, then you can include function call directly into map
{ "domain": "codereview.stackexchange", "id": 765, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, validation, authentication, clojure, web-services", "url": null }
deep-learning, convolution, gan Title: GAN vs DCGAN difference I am trying to understand the key difference between GAN and DCGAN. I know that DCGAN uses a convolutional network. But: What data is better to push into GAN and what data fits better to DCGAN? Does DCGAN work better with small data dimensions? A Generative Adversarial Network (GAN) takes the idea of using a generator model to generate fake examples and discrimator model that tries to decide if the image it receives is a fake (i.e. from the generator) or a real sample. This was originally shown with relatively simple fully connected networks.
{ "domain": "datascience.stackexchange", "id": 3223, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-learning, convolution, gan", "url": null }
time (The upper part of the diagram represents the celestial equator above the horizon (marked E W) for an observer in the northern hemisphere looking south. M is the culminating point where the equator intersects the (south) meridian. Q is the equinoctial point 'first point of Aries'. QS represents the sun's mean longitude reckoned from the equinox: it has been (in concept) transferred from the ecliptic to the equator where it now represents the mean right ascension of the fictitious mean sun. For convenience of arrangement, the diagram represents a position in early afternoon (S somewhat west of M) in about June (S is nearly 90° east of Q). (N) is below the horizon.) The time-definitions and explanations of J-J de Lalande (1792, 'Astronomie', 3rd ed. vol.1, art.1014, p.361, https://archive.org/details/astronomielalande01lala) state clearly (expressing right ascensions in degrees, according to Lalande's custom):-
{ "domain": "astronomy.stackexchange", "id": 2881, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time", "url": null }