text stringlengths 1 1.11k | source dict |
|---|---|
algorithms, master-theorem
Title: What is the case 2 in master theorem? I am confused about the statement of the Master theorem in CLRS book.
Here is the link of the book CLRS.
In page 94, the theorem, in case 2, states that:
If $\displaystyle f(n)=\Theta(n^{\log_ba})$, then $T(n) = \Theta(n^{\log_ba}\lg n)$. | {
"domain": "cs.stackexchange",
"id": 4423,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, master-theorem",
"url": null
} |
# What is the second smallest C single precision positive floating number there is? (IEEE754)
Documentation on how single precision floating point numbers work in C can be found in various good places such as:
To simplify, it is formed with 32 bits from where:
• 1 bit is for signal (bit 31)
• 8 bits for the exponent (bits 30 to 23), being 127 the zero "offset"
• 23 bits for the mantissa (bits 22 to 0), leaving the leading 1 out
From wikipedia you can see that:
7f7f ffff = 0 11111110 11111111111111111111111 = $(1 − 2^{−24}) × 2^{128} ≈ 3.402823466 × 10^{38}$ (max finite positive value in single precision)
0080 0000 = 0 00000001 00000000000000000000000 = $2^{−126} ≈ 1.175494351 × 10^{−38}$ (min normalized positive value in single precision)
That is, the minimum and maximum represented in binary and a decimal approximation.
I specially like the reference link number 4 above, where it states there is an epsilon. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018426872776,
"lm_q1q2_score": 0.816848529737785,
"lm_q2_score": 0.837619961306541,
"openwebmath_perplexity": 1767.3230136323698,
"openwebmath_score": 0.6747862696647644,
"tags": null,
"url": "https://math.stackexchange.com/questions/2469590/what-is-the-second-smallest-c-single-precision-positive-floating-number-there-is"
} |
ros, imu, navigation, ptam, robot-localization
Comment by K7 on 2015-09-02:
That has eliminated (most of) the drift and I think it is now using both sensors. It doesn't seem to be moving right but I will have another look at the tutorial about preparing sensor data and see if I can get that right. Thanks again!
Comment by K7 on 2015-09-02:
@Tom Moore just to check before moving on, the tf tree that is now generated after running ekf has 2 branches with odom at the root of both: odom->base_link->fcu and odom->world->usb_cam. Does this seem right? | {
"domain": "robotics.stackexchange",
"id": 22551,
"lm_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, imu, navigation, ptam, robot-localization",
"url": null
} |
quantum-mechanics, harmonic-oscillator, quantization
Which means the energy levels are separated by
$$ \Delta E = \hbar \omega = hf $$
I have also studied blackbody radiation and one of the assumptions Planck made was that the energy levels accessible to the cavity oscillators are separated by this same amount $\Delta E$. This makes sense to me as the source of blackbody radiation is just an oscillator in the wall so I can see the connection between a quantum harmonic oscillator and a cavity oscillator. However a photon that is emitted when an electron transitions between energy levels in an atom is not due to any oscillators, is it just a coincidence that the energy of a non-blackbody photon is given by $ E = \hbar \omega $ or is there some connection between photons and oscillators? It's not a coincidence! You can see the reason even in classical mechanics: if you take a charge and shake it sinusoidally at frequency $\omega_q$, it makes light with equal frequency $\omega_{\gamma} = \omega_q$. | {
"domain": "physics.stackexchange",
"id": 32303,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, harmonic-oscillator, quantization",
"url": null
} |
ros, gazebo, urdf, gazebo-plugins
Title: reference gazebo-plugin in urdf-description
Hi,
I'm writing my first description of an robot using urdf. To control the joints i tried to write a plugin for gazebo following the tutorials (simulator_gazebo/Tutorials/GazeboPluginIntro and plugins/model_manipulation_plugin). The Problem is, it seems that gazebo doesn't load my plugin. I think it's because of my urdf-file.
It looks like this:
<?xml version="1.0"?>
<robot name="pnp-robot">
<link name="base">
.
.
.
<!--some link-definitions-->
.
.
.
<joint name="base_turntable" type="continuous">
.
.
<!--some joint-definitions-->
.
.
<!--reference the Model-Plugin-->
<gazebo>
<plugin filename="lib/libpnp_robot.so" name="Controll_Plugin" />
<base_turntable>base_turntable</base_turntable>
<y_first_motor_first_arm>y_first_motor_first_arm</y_first_motor_first_arm>
<first_arm_y_sec_motor>first_arm_y_sec_motor</first_arm_y_sec_motor> | {
"domain": "robotics.stackexchange",
"id": 11945,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, gazebo, urdf, gazebo-plugins",
"url": null
} |
quantum-mechanics, operators, wigner-transform
Title: Wigner image of the product of two operators If we know the Wigner image of $\hat{A}$ and $\hat{B}$, how do we calculate the Wigner transform of $\hat{A}\hat{B}$? You just use the fundamental theorem of phase space quantization, formulated by Groenewold in 1946: for Wigner maps $\hat{A}\mapsto a(x,p)$ and $\hat{B}\mapsto b(x,p)$,
$$
\hat{A}\hat{B}~~~~\longmapsto ~~~~ a\star b ~, \\
(a \star b)(x,p) = \frac{1}{\pi^2 \hbar^2} \! \int \!a(x+x',p+p') b(x+x'',p+p'') \exp{\left(\tfrac{2i}{\hbar}(x'p''-x''p')\right)} ~ dx' dp' dx'' dp'' ,
$$
a highly non-local convolution.
(This integral form of Groenewold's *-product is due to G Baker, Phys Rev 109 (1958) 2198-2206.) | {
"domain": "physics.stackexchange",
"id": 49630,
"lm_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, operators, wigner-transform",
"url": null
} |
performance, c, memory-management, c99
The inuse stack should be replaced by a simple counter of how many items are in use. You can increment the counter on each get and decrement it on each put. | {
"domain": "codereview.stackexchange",
"id": 18311,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, c, memory-management, c99",
"url": null
} |
navigation, ekf, robot-localization
0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, | {
"domain": "robotics.stackexchange",
"id": 22182,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, ekf, robot-localization",
"url": null
} |
### issacnewton
Ray, ok, I will be careful about my arguments.
10. Feb 4, 2017
### Staff: Mentor
I said mean value theorem, not intermediate value theorem.
11. Feb 4, 2017
### issacnewton
Ok, I need to prove that $\forall~x \in (1, \infty), f(x) > f(1)$. We let $x \in (1, \infty)$ be arbitrary. Now consider the interval $[1, x]$. $f(x)$ is continuous on $[1,x]$ and differentiable on $(1,x)$. So there is $c \in (1,x)$ such that $f'(c) = \frac{f(x)-f(1)}{x-1}$. Since $c >1$, and $f(x)$ is increasing on $(1,\infty)$, we have $f'(c) > 0$. Since $x > 1$, we have $f(x) >f(1)$. Hence $2\sqrt{x} + \frac 1 x > 3$, or equivalently, $2\sqrt{x} > 3 - \frac 1 x$. Since $x$ is arbitrary, this is true for all $x > 1$. I hope the arguments are correct now.
12. Feb 4, 2017
Correct. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464506036181,
"lm_q1q2_score": 0.8275711240151455,
"lm_q2_score": 0.8479677583778258,
"openwebmath_perplexity": 311.8482794294287,
"openwebmath_score": 0.8275271058082581,
"tags": null,
"url": "https://www.physicsforums.com/threads/prove-2-sqrt-x-3-1-x-for-x-1.902615/"
} |
nuclear-physics, neutron-stars, orbitals, nucleosynthesis
(3/5)(Z^2e^2/r_N)$.
However, in terms of the energetics of the gas as a whole, the nuclei
are not isolated, but sit in a neutral Wigner-Seitz sphere, accompanied
by $Z$ electrons distributed pseudo-uniformly, where $q_e(r) = -Ze(r/r_0)^3$, is the charge distribution of the
electrons, and $r_0$ is the radius of the neutral Wigner-Seitz sphere. From this, it can be shown that the total Coulomb energy is
$$
E_C = \frac{Z^2 E^2}{4\pi \epsilon_0}\left( \frac{3}{5r_N} +
\frac{3}{5r_0} - \frac{3}{2r_0}\right)\, .
$$
If we write the fraction of the volume occupied by the nuclei as $f =
(r_N/r_0)^3$, we can rearrange this to give
$$
E_C = E_{C}^{(0)}\left( 1 - \frac{3}{2} f^{1/3} \right)\, .
\tag{1}
$$
Now, since $E_{C}^{(0)} \propto Z^2/r_N$ and $r_N \propto A^{1/3}$, where $A$ is the number of nucleons in each nucleus, then
for a certain value of $Z/A$, the Coulomb energy per nucleon $E_C/A
\propto A^{2/3}$. The surface energy term is proportional to the area | {
"domain": "physics.stackexchange",
"id": 27142,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, neutron-stars, orbitals, nucleosynthesis",
"url": null
} |
ACT Review - Math Formulas. Some of the worksheets for this concept are Interior and exterior angles of polygons, Interior angles of polygons and multiple choices, 6 polygons and angles, Infinite geometry, Work 1 revised convex polygons, 15 polygons mep y8 practice book b, 4 the exterior angle theorem, Mathematics linear 1ma0 angles polygons. Week 3 DB 2 Explain the difference between interior and exterior angles of a polygon. The sum of exterior angles in a polygon is always equal to 360 degrees. Recently I have created a YouTube Channel called Murali Maths Class, check for the latest Maths Videos on All the topics. The question can be answered only if the 20-gon is regular - ie all its angles are the same. The exterior angle of a regular polygon is our fourth of its interior angle. Some additional information: The polygon has 360/72 = 5 sides, each side = s. It is a regular pentagon. Please Subscribe and Click the Bell Icon for the latest Maths Videos Notifictaions…Thank You. And | {
"domain": "siofok.hu",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842205394514,
"lm_q1q2_score": 0.8902302567139693,
"lm_q2_score": 0.8976952927915968,
"openwebmath_perplexity": 575.798802440772,
"openwebmath_score": 0.3964621126651764,
"tags": null,
"url": "http://archiv.siofok.hu/1nura6/87847a-exterior-angle-of-a-polygon"
} |
digital-communications, modulation, demodulation
In general, the new SM, is how to use the index of antennas in order to transmit more bits which will improve the spectral efficiency.
Regarding to the answer coming from Marcus !!, I think Adding up the QAM-based modulation with BPSK-based modulation will not happen as long as you are transmitting that on different antennas, "Exactly as you've said in your question". Secondly, the channels should usually be uncorrelated, so interference can be entirely avoided.
In such new articles, such that Quadrature spatial modulation, that can work as long as the signal transmitted on antennas are orthogonal. So, interference can be entirely avoided too.
You are good, just keep going on. and if you needed any help, you'd write it as a question here, many people are helping and they will try to help you too.
thank you. | {
"domain": "dsp.stackexchange",
"id": 7003,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "digital-communications, modulation, demodulation",
"url": null
} |
navigation, gmapping, amcl
Title: Improve gmapping results
Hey everyone
I am working with the ROS Navigation stack using a simulated environment in Stage. Initially I would have created a topic criticizing the precision of the AMCL localization stack, but after deeper research I found the error to occur from the map I have created with the GMapping.
The following image shows the comparison between the ideal image (blue) and the resulting map from GMapping (red). Interesting enough the data fed into the GMapping process are all ideal, no error in either the odometry or the laser scans.
Besides setting the number of particles to 150 I use the standard settings when executing the GMapping process. Actually I have tried to reduce the update frequency in the translation and angular rotation, but it did not change alot.
Comparision http://s8.postimage.org/eeg3w3qtx/autolab_compare.png | {
"domain": "robotics.stackexchange",
"id": 10254,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, gmapping, amcl",
"url": null
} |
evolution, genetics, human-genetics, cloning
Today, cloning humans is possible, but at prohibitively high cost and risk. It is inevitably going to happen, but the costs and risks will impede its popularity. Process improvements that deliver more safety and reliability will allow human cloning to become more popular.
UPDATE: "Why cant it be attempted..?" It definitely is being attempted. Panayiotis Zavos is one doctor who has been very public about his attempts to clone humans:
"In April 2009, he claimed to have cloned 14 human embryos and transferred 11 of those to wombs."
AFAIK, none of these efforts led to a live birth. I'm sure other doctors have attempted and even more are considering it and waiting until it's a little more practical and realistic. | {
"domain": "biology.stackexchange",
"id": 3116,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, genetics, human-genetics, cloning",
"url": null
} |
3. The attempt at a solution
Initial stretch of spring by 400 g mass = (0.400 x 9.8) / 500 = 0.00784 m
The initial stretch is used to determine initial spring PE.
Since the initial and final positions are at rest, so ΔKE = 0.
Σ ΔPE = ΔPEspring + ΔPEgravity = (0.5 x 500 x (0.15 + 0.00784)2 - 0.5 x 500 x (0.00784)2) + (0 - 0.400 x 9.8 x 0.15 )
= (6.23 - 0.015) + (- 0.588)
= 5.627 J
∴ Work done = ΔKE + Σ ΔPE = 0 + 5.627 = 5.627 J
This work would be independent of the magnitude of force applied since work done depends on only ΔKE and Σ ΔPE, both of which are independent of force applied.
2. Mar 19, 2017
### PetSounds
With only one significant figure in your original measurements, I don't think the difference in your answers will matter.
3. Mar 19, 2017
### TJGilb | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.969785409439575,
"lm_q1q2_score": 0.8355071886286213,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 832.9508841870673,
"openwebmath_score": 0.5360468626022339,
"tags": null,
"url": "https://www.physicsforums.com/threads/what-is-the-work-done-in-this-case.908239/"
} |
performance, r, memory-optimization
# maybe not needed
# the same approach for ExitVal as it was sufficiently fast
dt[, ExitVal := frollapply(lead(High, holdPeriod), holdPeriod, max,
align = "right", fill = NA), by = id]
dt[, NWeekRet := (ExitVal / Adj.Close - 1)]
dt <- dt[!is.na(wtMean) & !is.na(ExitVal)]
dt[, WeekNum := c(k:(.N + k - 1)), by = id]
res <- dt[, .(StockName, WeekNum, M_Score = wtMean, NWeekRet)]
return(res[])
} | {
"domain": "codereview.stackexchange",
"id": 41435,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, r, memory-optimization",
"url": null
} |
c#, generics, reflection, extension-methods
Real-world example
I'll be using it for retrieving UseX attributes in a model like this one:
[UsePrefix("app"), UseNamespace, UseType, UseMember]
[TrimStart("I")]
public interface IDemo : INamespace
{
[UseType, UseMember]
object Greeting { get; } // <-- will use its own attributes
[Tag("io")]
object ReadFile { get; } // <-- will use type's attributes
}
Questions
So, what do you think about this implementation? Am I missing anything important here? Is there anything you would improve?
public static IEnumerable<AttributeCollection<T>> EnumerateCustomAttributes<T>(this MemberInfo member) where T : Attribute
I'm surprised that this method doesn't have a docstring, and I don't find its name very descriptive. What differentiates this from GetCustomAttributes is that it inherits, so I'd expect a name like InheritedCustomAttributes. (Perhaps there's an equally succinct name which makes it clear that it includes attributes defined directly on the member). | {
"domain": "codereview.stackexchange",
"id": 34862,
"lm_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#, generics, reflection, extension-methods",
"url": null
} |
c#, interpreter, brainfuck
/// <summary>
/// Step one cell to the left. </summary>
public void StepLeft()
{
if (_pos == 0)
throw new InvalidOperationException();
else
_pos--;
}
/// <summary>
/// Step one cell to the right. </summary>
public void StepRight()
{
_pos++;
if (_pos == _tape.Count)
_tape.Add(default(T));
}
/// <summary>
/// Return a full snapshot of the tape without altering anything. </summary>
public T[] ToArray()
{
return _tape.ToArray();
}
}
Interpreter
public class BrainfuckInterpreter
{
Stream _program;
Stream _input;
Stream _output;
Tape<byte> _tape;
Stack<long> _callStack; | {
"domain": "codereview.stackexchange",
"id": 22543,
"lm_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#, interpreter, brainfuck",
"url": null
} |
electric-circuits, electric-current
Title: Path Of Current In A Wire Why does current follow the path of least resistance? Will all current pass through a wire with $0$ resistance in a junction leaving other resistive wires with no current?
Why does current follow the path of least resistance? | {
"domain": "physics.stackexchange",
"id": 52039,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, electric-current",
"url": null
} |
c#, client
// Disconnect was sent; server acknowledges
if (response == "[DisconnectAcknowledge]")
{
EndRcvThread = true;
Output.Debug("Waiting for thread termination");
while (!RcvThreadEnded)
{
Thread.Sleep(100);
}
Output.Debug("Thread terminated, cleaning send client");
Client.SendMessage("");
Client.client.Close();
Output.Debug("Cleaned up send client");
if (Output.DebugMode)
{
Console.WriteLine();
Output.Debug("Press any key to exit");
Console.ReadKey();
}
Environment.Exit(0);
} | {
"domain": "codereview.stackexchange",
"id": 12905,
"lm_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#, client",
"url": null
} |
game, tic-tac-toe, ti-basic
The TI-84 has remainder() instead of mod().
The TI-83 has neither remainder() nor mod(), and must use 6(3fPart((M-1)/3)-1)→H.
I believe the latter is works for all three models.
Your use of Goto is unjustified. I should be initialized, tested, and incremented using a For( loop.
To toggle F between 0 and 1, just do 1-F→F. You don't need an abs function.
I'm not sure that ClrDraw adequately resets the drawing context. On the TI-85, I need ClDrw, ZStd (to set the bounds to the standard zoom), and AxesOff (to hide the axes). | {
"domain": "codereview.stackexchange",
"id": 8257,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "game, tic-tac-toe, ti-basic",
"url": null
} |
ros, follow-joint-trajectory
The code in the following link "https://github.com/davetcoleman/clam" is customized to a 7 dof arm having a different configuration from clam arm. The difference is in the sequence of joints in the arm. Here is the data in the configuration files:
cool1000.yaml
joint1_controller:
type: dynamixel_hardware_interface/JointPositionController
joint: joint1
max_velocity: 0.2
motors:
- id: 0
init: 2048
min: 318
max: 3779
joint2_controller:
type: dynamixel_hardware_interface/JointPositionController
joint: joint2
max_velocity: 0.2
motors:
- id: 1
init: 2048
min: 1017
max: 3084
- id: 2
reversed: true
joint3_controller:
type: dynamixel_hardware_interface/JointPositionController
joint: joint3
max_velocity: 0.2
motors:
- id: 3
init: 2048
min: 275
max: 3796
joint4_controller:
type: dynamixel_hardware_interface/JointPositionController
joint: joint4
max_velocity: 0.2
motors:
- id: 4
init: 2048
min: 920 | {
"domain": "robotics.stackexchange",
"id": 21647,
"lm_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, follow-joint-trajectory",
"url": null
} |
the User-Entered set F vs. time graph (no number scale needed) for a ball rolling down a ramp. Draw the acceleration versus time graph. We justify this by writing "v(t) > 0 and a(t) < 0 means the object is slowing down. Time Graphs - GeoGebra Materials. If you graph F v Δx, you get the slope k. For such graphs, the area under the line is the work done by the force. | {
"domain": "recht-sozial-in-muenchen.de",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307653134903,
"lm_q1q2_score": 0.8288059036634363,
"lm_q2_score": 0.8519528094861981,
"openwebmath_perplexity": 406.26535855123575,
"openwebmath_score": 0.4911710321903229,
"tags": null,
"url": "https://recht-sozial-in-muenchen.de/what-does-the-slope-of-a-force-vs-acceleration-graph-represent.html"
} |
python, performance, object-oriented, python-2.x, excel
# function to calculate between 2 dates in unicode string/moodle log
# format e.g. <'01 September 2001, 11:50AM'> -> time/python convention
def timegap(self, i, j):
self.gap = self.udconv(i) - self.udconv(j)
return self.gap
# ---------------------------- Methods ------------------------------------
def openworkbook(self):
self.wb = open_workbook(
self.sourcefilepath + 'activitylog.xlsx',
on_demand=True)
def extractstudentslist(self):
# Extract the list [activestudents] of all students from the 3rd
# worksheet (list student names) in moodle.xlsx
self.sh = self.wb.sheet_by_index(1)
self.activestudents = [[x, False] for x in self.sh.col_values(0)] | {
"domain": "codereview.stackexchange",
"id": 8081,
"lm_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, object-oriented, python-2.x, excel",
"url": null
} |
machine-learning, computational-learning-theory, vc-dimension, vc-theory
Title: What do we mean by saying "VC dimension gives a LOOSE, not TIGHT bound"? From what I understand VC dimension is what establishes the feasibility of learning for infinite hypothesis sets, the only kind we would use in practice.
But, the literature (i.e. Learning from Data) states that VC gives a loose bound, and that in real applications, learning models with lower VC dimension tend to generalize better than those with higher VC dimension. So, a good rule of thumb would be to require at least 10xVC dimension examples in order to get decent generalization.
I am having trouble interpreting what loose bound means. Is the VC generalization bound loose due to its universality? Meaning, its results apply to all hypothesis sets, learning algorithms, input spaces, probability distributions, and binary target functions. | {
"domain": "ai.stackexchange",
"id": 1882,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, computational-learning-theory, vc-dimension, vc-theory",
"url": null
} |
c++, classes, cache, static
Title: Static class member destruction in C++ I have a basic cache set up. Whenever a user requests a bitmap, it fetches or loads it from disk if it isn't already loaded, significantly reducing load times.
Currently, the design explicitly tells the user that they are responsible for freeing the individual bitmaps when they are done. That's fine, but the biggest problem I notice right away is that the cache is created on first use. There's no way to delete it without having the user expressly call a Release method (which seems like a bad idea). They are forced not only to release each individual bitmap, but also the cache even though they never created it.
Should I create Initialize and Release methods strictly to new and delete the std::map?
(It's named pool in the code because the member name hasn't been updated as of this posting.)
BitmapCache.h
#ifndef CBITMAPCACHE_H
#define CBITMAPCACHE_H | {
"domain": "codereview.stackexchange",
"id": 606,
"lm_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++, classes, cache, static",
"url": null
} |
complexity-classes, polynomials
&=\sum_{a\in\ff^k}f(a)\sum_{a^{-1}(1)\sset I\sset[k]}\prod_{i\in I}x_i\\
&=\sum_{I\sset[k]}\prod_{i\in I}x_i\underbrace{\sum_{\substack{a\in\ff^k\\a^{-1}(1)\sset I}}f(a)}_{f_I},
\end{align*}$$
where $a^{-1}(1)=\{i\in[k]:a_i=1\}$. That is, each coefficient $f_I$ is a sum (modulo $2$) of certain entries of the truth table; thus, we can compute $\langle f_I:I\sset[k]\rangle$ using a uniform $\mathrm{AC}^0[2]$ circuit, and then for a given $d$,
$$\operatorname{deg}(f)\ge d\iff\bigvee_{|I|\ge d}f_I$$
is also computable in uniform $\mathrm{AC}^0[2]$.
On the other hand, the problem is $\mathrm{AC}^0[2]$-complete: by the expansion above, $f_{[k]}$ is the parity of the whole truth table (considered as a string); observe that $f_{[k]}=1\iff\operatorname{deg}(f)\ge k$. | {
"domain": "cstheory.stackexchange",
"id": 5613,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-classes, polynomials",
"url": null
} |
error-correction, terminology-and-notation, stabilizer-code, nielsen-and-chuang
Almost all quantum error correction codes that people consider in practise are stabiliser codes. This is one reason why you may have problems distinguishing the two terms. However, we do not require that a quantum error correction code be a stabiliser code — just as in principle we do not require a classical error correction code to be a linear code. Stabiliser codes just happen to be an extremely successful way of describing quantum error correcting codes, just as linear error correcting codes are an extremely successful way of describing classical error correcting codes. And indeed, stabiliser codes can be regarded as a natural generalisation of the theory of classical linear codes to quantum error correction. | {
"domain": "quantumcomputing.stackexchange",
"id": 113,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "error-correction, terminology-and-notation, stabilizer-code, nielsen-and-chuang",
"url": null
} |
reproduced in any form without written my permission. Why is the shortest distance the perpendicular distance for parallel lines? Vectors. Shortest Distance Between Parallel LinesWatch more videos at https://www.tutorialspoint.com/videotutorials/index.htmLecture By: Er. Equation of tangent to circle- HELP URGENTLY NEEDED, GCSE Maths help: Upper bounds and lower bounds, MathsWatch marking answers as wrong when they are clearly correct, Integral Maths Topic Assessment Solutions, A regular hexagon and a regular octagon are joined work out angle x, No - I plan on travelling outside these dates, No - I'm staying at my term time address over Christmas. For this to be a minimum, taking partials, we want $D_s = D_t = 0$. How to Find the Shortest Distance between a Point and a Line, using vector equations.1. Q is a vector joining O and V. One point on each vector also needs to be known to comupte Q (Q=Point1-Point2) SD is the shortest distance returned by the function. Free practice questions | {
"domain": "phileasguides.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147169737825,
"lm_q1q2_score": 0.8284514428010357,
"lm_q2_score": 0.8519528019683106,
"openwebmath_perplexity": 751.5349426013706,
"openwebmath_score": 0.43332409858703613,
"tags": null,
"url": "http://www.phileasguides.com/disney-over-ujgfyh/shortest-distance-between-two-lines-vectors-dd442a"
} |
organic-chemistry, reaction-mechanism, molecular-orbital-theory, pericyclic
This is a chelotropic reaction, a subset of cycloaddition\fragmentation reactions. As to whether it proceeds by a concerted or radical mechanism, well, you haven't presented any experimental data that can help us decide. For example, if the reaction had been run with the cis-2,3-dimethylcyclopropane analogue and both cis- and trans-but-2-ene were found among the products, we could argue for a biradical, two-step (non-concerted) process. When we create an orbital symmetry diagram, that just allows us to make a prediction as to whether or not we expect the reaction to be concerted.
I strongly assume the empty p-orbital to be in hyperconjugation with
the walsh orbitals | {
"domain": "chemistry.stackexchange",
"id": 3961,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism, molecular-orbital-theory, pericyclic",
"url": null
} |
sampling, lowpass-filter, filtering, analog-to-digital, resolution
Title: Using oversampling to increase resolution of a DC-signal as input Currently I'm working on a project which uses oversampling to increase the resolution of a 12 bit ADC to a maximum of 16 bits. My goal is to fully understand the theory behind oversampling and why it is increasing the resolution. As far as I understood this topic, oversampling and decimation increases the resolution because the white noise of the input signal is distributed along a larger frequency span. After the oversampling the signal gets low pass filtered, so that we achieve fewer noise in the frequency span of interest (see the first figure).
So far so good, but I think i'm still not 100% confident of what is going on here: | {
"domain": "dsp.stackexchange",
"id": 9690,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sampling, lowpass-filter, filtering, analog-to-digital, resolution",
"url": null
} |
python, game, python-3.x, tic-tac-toe
def console_log(level,log_line):
global VERBOSE
if level <= VERBOSE:
print (log_line)
if __name__ == '__main__':
main() Wow, that’s a lot of code! Rather than read it all, I’m just going to try running the final file:
$ python tictactoe.py
Traceback (most recent call last):
File "tictactoe.py", line 3, in <module>
from humanPlayer import humanPlayer
ImportError: No module named 'humanPlayer'
*is sad*
But upon inspection, we aren’t actually using that class, so I’ll just remove the import line.
Wow, lots of input just flew past very quickly! Let’s inspect a few of the boards which just went across my screen:
A game which ended in victory:
O | X |
---+---+---
X | O | X
---+---+---
X | O | O
Rand 2 has won
The board is drawn in terms of O’s and X’s, but the players are numbered. Perhaps it would be better to name the players after their symbols?
A game which ended in a draw:
X | O | X
---+---+---
X | X | O
---+---+---
O | X | O | {
"domain": "codereview.stackexchange",
"id": 15761,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, game, python-3.x, tic-tac-toe",
"url": null
} |
ros, marker, publish
Title: Publishing Marker arrow causes Segmentation fault (core dumped)
Hello,
I am trying to publish a marker arrow and want to visualize it in rviz with a start and an end point.
When I am using the points member as described here http://wiki.ros.org/rviz/DisplayTypes/Marker#Arrow_.28ARROW.3D0.29 and try to run it I am getting the following error: Segmentation fault (core dumped).
When I am just using the pose.position and pose.orientatien without the points member the arrow is appearing.
visualization_msgs::Marker markers_msg;
markers_msg.header.frame_id = "world";
markers_msg.header.stamp = ros::Time::now();
markers_msg.ns = "drop";
markers_msg.id = 0;
markers_msg.type = visualization_msgs::Marker::ARROW;
markers_msg.action = visualization_msgs::Marker::ADD;
markers_msg.pose.position.x = 1;
markers_msg.pose.position.y = 1;
markers_msg.pose.position.z = 1;
markers_msg.pose.orientation.x = 0.0;
markers_msg.pose.orientation.y = 0.0; | {
"domain": "robotics.stackexchange",
"id": 36437,
"lm_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, marker, publish",
"url": null
} |
machine-learning, classification, dataset, matlab
Why is this data missing?
How much data is missing?
There are many reasons for a specific information to be unavailable. This will demand you to make assumptions and decide how to deal with this.
Jeff Sauro posted at MeasuringU: 7 Ways to Handle Missing Data, some which I list here:
Delete corrupted samples:
If you have a large dataset and there is not much data missing, you can simply remove those corrupted data points and go on with life
Recover the values:
Some problems will allow you to go back and get missing information.
We usually ain't that lucky, then you can
Educated Guessing:
Sometimes, you can infer what would be the feature value by simply looking their pears. That is a bit arbitrary but it might work.
Average:
This is the most common approach, simply use the average of that value whenever it is missing. This might artificially reduce your variance but so does using 0 or -9999... for every missing value.
Regression Substitution: | {
"domain": "datascience.stackexchange",
"id": 5011,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, classification, dataset, matlab",
"url": null
} |
java, tree, junit
}
I hope to hear some advice from you. I'd also be interested in hearing different approaches you would use to determine if the given binary search tree is complete. Especially, something not based on BFS. Keep it simple
You should live by the KISS principle.
private boolean isFull(Node node) {
if (node == null) {
return true;
}
return !(node.left == null ^ node.right == null) && isFull(node.left) && isFull(node.right);
} | {
"domain": "codereview.stackexchange",
"id": 23767,
"lm_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, tree, junit",
"url": null
} |
cc.complexity-theory, complexity-classes, oracles
✱ Warning: It is tempting to express “$\textbf{Almost}X$” as “$X$ with respect to a random oracle” and “$\textbf{Generically}X$” as “$X$ with respect to a generic oracle”. (Indeed, this is how I think of them intuitively.) This is, however, potentially confusing, because there are absolutely defined notions of “random” and “generic”, and in fact many variations on what “random” and “generic” mean (even though the common theme is “does not belong to any computable-in-some-sense null set”, resp. “does not belong to any computable-in-some-sense meager set”). See this other question and the answers to it concerning “random”, but the same points can be made concerning “generic”. (In the context of set theory, see Jech, Set Theory (Third Millennium Edition) lemma 26.4 (p. 514) for a characterization of (forcing-)random reals and (Cohen-forcing-)generic reals along these lines.) So I prefer to refrain speaking of “random” and “generic” oracles in the actual question, but it is also impossible | {
"domain": "cstheory.stackexchange",
"id": 5720,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, complexity-classes, oracles",
"url": null
} |
# How to check the real analyticity of a function?
I recently learnt Taylor series in my class. I would like to know how is to possible to distinguish whether a function is real-analytic or not. First thing to check is if it is smooth. But how can I know whether the taylor series converges to the function?
For example: $f(x)=\frac{1}{1-x}, x\in(0,1)$ has $n^{th}$ degree taylor polynomial $\sum_{k=0}^n x^k$. In this case, I understand that $f$ is analytic in its domain since the geometric series $\sum_{k=0}^\infty x^k$ for $x\in(0,1)$ converges to $\frac{1}{1-x}$.
In general, what is the trick? For example, how to know if $\sin(x),\cos(x)$ are analytic?
-
Any reason for downvote? – math Dec 3 '13 at 4:27
Nice question!${}$ – Andrés Caicedo Dec 3 '13 at 4:39
@mathandzen: No good reason, it seems to me. This is an almost platonic example of a good question for a site like this one. – Pete L. Clark Dec 11 '13 at 17:11 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102542943774,
"lm_q1q2_score": 0.8082553410880018,
"lm_q2_score": 0.8354835371034368,
"openwebmath_perplexity": 144.7468817010959,
"openwebmath_score": 0.9568079113960266,
"tags": null,
"url": "http://math.stackexchange.com/questions/590455/how-to-check-the-real-analyticity-of-a-function"
} |
proteins, nutrition, energy-metabolism, energy, carbohydrates
Now, each macronutrient has a certain amount of calories per gram of nutrient - if I'm not mistaken 1 g of protein has 4 kcal.
On the other hand, according to different sources that I've been reading lately, the body does not really use protein for energy gain unless in extreme circumstances. In other words, carbohydrates and fat can readily be "converted" to ATP for energy gain while the conversion of protein into glucose and then ATP is very inefficient. At least that's my understanding, if there's already a misconception here feel free to correct it. | {
"domain": "biology.stackexchange",
"id": 12456,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "proteins, nutrition, energy-metabolism, energy, carbohydrates",
"url": null
} |
machine-learning, machine-learning-model, anomaly-detection, binary, anomaly
Title: Anomaly Detection System I need a sanity check. I want to create an anomaly detection system.
The logic which I am planning to use is the following:
Find anomalies in the past using Seasonal Hybrid Extreme Studentized Deviate Test.
Binarise the anomalies (1 the anomalies and 0 the trends).
Run several algorithms (Autoencoders, SVM, Logistic Regression, Naive Bayes, Lasso Regression, etc) with variables that are correlated and validate the models and use it. | {
"domain": "datascience.stackexchange",
"id": 5087,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, machine-learning-model, anomaly-detection, binary, anomaly",
"url": null
} |
• @Shane very true. Should I proceed with cases, knowing that 4 way ties or more would actually break the questions rules? – Dunka Nov 7 '14 at 1:17
• I'm not sure, to be honest. I'm one of those annoying commenters who only points out problems with what you're doing rather than offering solutions! Hopefully somebody smarter than I will intervene at any moment now :P – Shane Nov 7 '14 at 1:18 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464499040094,
"lm_q1q2_score": 0.8352648921172448,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 1332.2212116167086,
"openwebmath_score": 0.4227326512336731,
"tags": null,
"url": "https://math.stackexchange.com/questions/1009865/how-many-ways-are-there-for-three-medals-to-be-awarded-if-ties-are-possible/1009917"
} |
differential-geometry, tensor-calculus, definition, conventions
$$(w \wedge u)_{a_1 ... a_p b_1 ... b_q}= \frac{1}{p!q!} \sum_{\text{permutations}}\text{sgn(perm)}w_{[a_1 ... a_p}u_{b_1 ... b_q]}$$ Here is a reasoning. Define a vector space $V$ with basis $e^i$ ($i=1,...,n$). Define a unital associative algebra $\Lambda(V)$ generated by $V$ such that $v^2=0$ for all $v\in V$. If no additional relations are imposed then $\Lambda(V)$ is necessarily the exterior algebra over $V$. There are mathematically rigorous ways to construct this but for the purposes of this answer, it is not important.
Denote the multiplication in $\Lambda(V)$ by $\wedge$. The set $$ 1 \\ e^i \\ e^{i_1}\wedge e^{i_2} \quad i_1<i_2 \\ \vdots \\ e^{i_1}\wedge...\wedge e^{i_r}\quad i_1<...<i_r \\ \vdots \\ e^1\wedge...\wedge e^n $$ forms a linear basis for $\Lambda(V)$. | {
"domain": "physics.stackexchange",
"id": 76690,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "differential-geometry, tensor-calculus, definition, conventions",
"url": null
} |
qiskit, measurement, simulation
What is the significance of simulating the process of measurement in quantum computing simulators? This is a bit like asking why flight simulators force you to land the plane. Why not just teleport the plane to the ground with the push of a button? After all, the simulator isn't bound by the rules of physics, and landing by magic unphysical teleportation would be much safer and faster than the normal type of landing.
Basically, you are assuming the only purpose of a simulator is to solve the simulated problem. But actually, it's far more common for simulators to be used as training to prepare for using the real thing or as a stand-in to understand the behavior of the real thing. For those kinds of tasks, giving magical unphysical access to the underlying wavefunction can completely defeat the purpose. | {
"domain": "quantumcomputing.stackexchange",
"id": 4413,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "qiskit, measurement, simulation",
"url": null
} |
reinforcement-learning
Yes, a model of a stochastic environment can be one of:
A distribution model, that outputs a probability distribution for next state and reward, given current state and action. If you are reading Sutton & Barto, or similar work which uses the function $p(s',r|s,a)$, then if you can implement this function for the whole environment, it means that you have access to a distribution model.
A sampling model, that outputs a single reward and next state, given current state and action, with the same probability of any outcome as the real environment. If you can implement an accurate simulation of an environment, then you have a sampling model.
If you want to use approaches such as Dynamic Programming, which work with expected values, then this is much easier with a distribution model, and in that case you need an accurate model from the start (otherwise Dynamic Programming may converge to a non-optimal policy). | {
"domain": "datascience.stackexchange",
"id": 5980,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning",
"url": null
} |
c#, strings, parsing
Title: Extracting a Decimal from a string I have the following method which extracts a decimal value from a string.
using System;
using System.Linq;
using System.Text;
namespace Foo.Bar.Common.Converters
{
public static class DecimalConverter
{
public static Decimal ExtractDecimalFromString(string str)
{
var sb = new StringBuilder();
foreach (var c in str.Where(c => c == '.' || Char.IsDigit(c)))
{
sb.Append(c);
}
return Convert.ToDecimal(sb.ToString());
}
}
} | {
"domain": "codereview.stackexchange",
"id": 12739,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, strings, parsing",
"url": null
} |
data-cleaning, numpy, transformation
Title: Data Skewness is nan or inf I have checked the Skewness of my data before applying a Log transformation using the next code :
print("Skewness: %f" % df['Wind Speed (km/h)'].skew())
and it gave me :
Skewness: 1.113493
So my data is highly Skewed. Then, I have applied a log transformation using the next code:
log_transformed = np.log(df['Wind Speed (km/h)'])
and it gave me the next result:
Skewness: nan
I could not understand why I got this value and what should I do Probably your column contains zeros or negative values.
Note that np.log(0) returns -inf and np.log(-1) returns nan, which would explain your computed skewness. | {
"domain": "datascience.stackexchange",
"id": 11983,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "data-cleaning, numpy, transformation",
"url": null
} |
vba, excel
.Range("genGuarantorName5") = loanData.Range("CustName6")
End With
End If
Else:
GeneralInfo.Range("NoGuar") = 0
GeneralInfo.Range("A7") = vbNullString
Select Case borrCount
Case Is = 1
GeneralInfo.Range("genBorrName") = CustName1
Case Is = 2
GeneralInfo.Range("genBorrName") = CustName1 & " & " & CustName2
Case Is = 3
GeneralInfo.Range("genBorrName") = CustName1 & " & " & CustName2
GeneralInfo.Range("genGuarantorName1") = CustName3
Case Is = 4
GeneralInfo.Range("genBorrName") = CustName1 & " & " & CustName2
GeneralInfo.Range("genGuarantorName1") = CustName3 & " & " & custName4
Case Is = 5
GeneralInfo.Range("genBorrName") = CustName1 & " & " & CustName2 | {
"domain": "codereview.stackexchange",
"id": 37212,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel",
"url": null
} |
$\frac{5\sqrt{2}}{\sqrt{36}} = \frac{5\sqrt{2}}{6}$
The last result is in simple radical form. It is not possible to extract a perfect square root from any radical, there are no fractions under any radical, and the denominator is free of radicals.
In Figure 6, we compare the approximation for our original expression with $$\frac{5}{\sqrt{18}}$$ our simple radical form $$\frac{5\sqrt{2}}{6}$$.
Let’s look at another example.
Example $$\PageIndex{5}$$
Place the expression $$\frac{18}{\sqrt{27}}$$ in simple radical form.
Solution
Note that $$3 \cdot 27 = 81$$ is a perfect square. We begin by multiplying both numerator and denominator of our expression $$\sqrt{3}$$.
$$\frac{18}{\sqrt{27}} = \frac{18}{\sqrt{27}} \cdot \frac{\sqrt{3}}{\sqrt{3}}$$
Multiply numerators and denominators. In the denominators, $$\sqrt{27}\sqrt{3} = \sqrt{81}$$
$$\frac{18}{\sqrt{27}} \cdot \frac{\sqrt{3}}{\sqrt{3}} = \frac{18\sqrt{3}}{\sqrt{81}}$$
Of course, $$\sqrt{81} = 9$$, so | {
"domain": "libretexts.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526459624252,
"lm_q1q2_score": 0.8302092449775559,
"lm_q2_score": 0.8376199653600372,
"openwebmath_perplexity": 356.65065799553645,
"openwebmath_score": 0.9020271897315979,
"tags": null,
"url": "https://math.libretexts.org/Bookshelves/Algebra/Intermediate_Algebra_(Arnold)/09%3A_Radical_Functions/9.03%3A_Division_Properties_of_Radicals"
} |
Chapter No 10 Exercise No 10. Half-Angle Identities D We can use the double-angle identities for cosine to derive half-angle identities. Sum and difference formulas. Interactive math video lesson on Double angle identities: Trig functions of twice an angle - and more on trigonometry. Double-Angle Formulas A number of basic identities follow from the sum formulas for sine,cosine,and tangent. 5—10sin2 x = Given: sin A = — 12 3m cos B 13' 2 6, cos(2A) = 2 25 8. For example, sin(2A) = sin(A)cos(A) + cos(A)sin(A) = 2sin(A)cos(A). for example:$\csc2\cdot8=0. Trigonometric Functions of Arbitrary Angles sin X = b / r , csc X = r / b. So, using the first of the two properties above: (Since 1/5 = 2*(1/10)) The coefficients in the formula can often be "matched" by use of factoring. He gets some numbers for an example from a random double star, so writes as below: sinγA = [7. The double‐angle identity for tangent is obtained by using the sum identity for tangent. 2756373558169992\$. The first two | {
"domain": "iononsononormaleioamo.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9927672355545385,
"lm_q1q2_score": 0.822943280790361,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 938.1836690600358,
"openwebmath_score": 0.8869953751564026,
"tags": null,
"url": "http://iononsononormaleioamo.it/yftz/double-angle-identities.html"
} |
which can also be written
## ½ [ \frac{x\ cos\frac{π}{6} + 1}{x^2 + 2x\ cos\frac{π}{6} + 1} - \frac{x\ cos\frac{π}{6} - 1}{x^2 - 2x\ cos\frac{π}{6} + 1} ] ##
Again that can be written
## ½ [ \frac{x\ cos\frac{π}{6} + 1}{x^2 + 2x\ cos\frac{π}{6} + 1} + \frac{x\ cos\frac{2π}{6} + 1}{x^2 + 2x\ cos\frac{π}{6} + 1} ] ##
which appears close to but as far as I can see ATM not quite the same as yours.
Last edited:
Anyway, doing it for (x6 - 1): this factorises algebraically to
(x2 - 1)(x2 + x + 1)(x2 - x + 1).
Hi,
Unless I'm wrong, ## \cos (\frac{\pi}{3}) = 1/2,\ \cos (\frac{2\pi}{3}) = -1/2 ##, so
## x^2 - x + 1 = x^2 - 2x\cos (\frac{\pi}{3}) + 1 ##
## x^2 + x + 1 = x^2 - 2x\cos (\frac{2\pi}{3}) + 1##
Following what you said, the factorisation of ##x^6 - 1 ## is
## x^6-1 = (x-1)(x+1)(x^2 - 2x\cos (\frac{\pi}{3}) + 1)(x^2 - 2x\cos (\frac{2\pi}{3}) + 1)## | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426428022032,
"lm_q1q2_score": 0.829838360602641,
"lm_q2_score": 0.8519528038477825,
"openwebmath_perplexity": 2185.3668015142666,
"openwebmath_score": 0.8888143301010132,
"tags": null,
"url": "https://www.physicsforums.com/threads/partial-fraction-decomposition.816073/"
} |
javascript, unit-testing, random, integration-testing
Title: Function for getting strings consisting of random characters I've made this function for to be used while testing.
// ----- THE ACTUAL FUNCTION -------------------------
// Returns a string consisting of random alphabetic
// characters. | {
"domain": "codereview.stackexchange",
"id": 21287,
"lm_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, unit-testing, random, integration-testing",
"url": null
} |
cc.complexity-theory, reference-request, machine-learning
Workshop: Provable Bounds in Machine Learning — August 1-2, 2012
In TCS a main area of study of "learning" sometimes maybe confusingly even also called "machine learning" is called PAC theory which stands for Probably Approximately Correct. its early 1980s origin predates much more modern research into "machine learning." wikipedia calls it part of the field computational learning theory. PAC often concerns results of learning boolean formulas given statistical samples of the distributions etc and the achievable accuracy of learning given various algorithms or limited samples. This is studied in a rigorous theoretical way with tie-ins to complexity classes. But it is not so much an applied study & wikipedias page on machine learning does not even list it.
The Computational Complexity
of Machine Learning PhD thesis by Kearns
Xing slides on (PAC) machine learning | {
"domain": "cstheory.stackexchange",
"id": 1693,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, reference-request, machine-learning",
"url": null
} |
c#, performance, programming-challenge
Short of those situations, the maintainability of your code is far more important than the speed. I don't know whether my solution is faster than yours, but
If it is, I'll bet it's too small of a difference for a human to notice
If there's a bug, I'd rather be troubleshooting the one with unit tests
When the requirements change, I'd rather be expanding the one with unit tests
I've gone on long enough, so I'll spare you any more preaching about Separation of Concerns and Unit Testing. Let me just include some snippets from my other tests:
// NameParser should sanitize like this
("sender", "sender"),
("SENDER", "SENDER"),
("S12end3456er", "Sender"),
("@$s e^&*", "s e"), | {
"domain": "codereview.stackexchange",
"id": 32929,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, programming-challenge",
"url": null
} |
reinforcement-learning, comparison, terminology, sutton-barto, control-theory
With an emphasis on the elements of reinforcement learning - that is, policy, agent, environment, etc., what are the key differences between (deep) RL and optimal control theory?
In optimal control we have, controllers, sensors, actuators, plants, etc, as elements. Are these different names for similar elements in deep RL? For example, would an optimal control plant be called an environment in deep RL? The same book Reinforcement learning: an introduction (2nd edition, 2018) by Sutton and Barto has a section, 1.7 Early History of Reinforcement Learning, that describes what optimal control is and how it is related to reinforcement learning. I will quote the most relevant part to answer your question, but you should read all that section to have a full understanding of the relationship between optimal control and reinforcement learning. | {
"domain": "ai.stackexchange",
"id": 2344,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning, comparison, terminology, sutton-barto, control-theory",
"url": null
} |
quantum-mechanics, operators, commutator
The displaced observables bear the same relationship to the displaced vectors as the original observables do to the original vectors, as was discussed in Sec. 3.1. In particular,
\begin{equation}
\mathbf{Q} \rightarrow \mathbf{Q}^{\prime} = e^{−i \mathbf{a} \cdot \mathbf{P}} \mathbf{Q} e^{i \mathbf{a} \cdot \mathbf{P}}\tag{3.41}
\end{equation}
with
\begin{equation}
Q_{\alpha}^{\prime} | \mathbf{x} \rangle^{\prime} = x_{\alpha} | \mathbf{x} \rangle^{\prime} \qquad (\alpha = 1, 2, 3).\tag{3.42}
\end{equation}
But since $ | \mathbf{x} \rangle^{\prime} = | \mathbf{x} + \mathbf{a} \rangle$, a comparison of (3.42) with (3.36) implies that
\begin{equation}
\mathbf{Q}^{\prime} = \mathbf{Q} − \mathbf{a} I\tag{3.43}
\end{equation}
where $I$ is the identity matrix. [...]
Equating terms of first order in $a$ from (3.43) and (3.41), we obtain
\begin{equation}
[Q_{\alpha}, a \cdot \mathbf{P}] = i_{\alpha} I,\tag{3.44}
\end{equation} | {
"domain": "physics.stackexchange",
"id": 2619,
"lm_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, operators, commutator",
"url": null
} |
quantum-mechanics, general-relativity, special-relativity, virtual-particles
Contrary to popular belief, Feynman diagrams do not depict a process in space and time. They are visualization of contributions to an amplitude, but they do not depict a quantum field theoretic process in any sense. Their axes have no units (there is no "time direction", only the marking of the external legs as "in" or "out" is relevant!), all that matters is their structure as a graph. The internal lines don't corresponding to any physical "entity" that we could measure or interact with. Virtual particles don't "follow world lines" because they are exactly as real as the lines for latitude and longitude we draw on maps. They are tools we use to describe nature, but they are not part of nature. | {
"domain": "physics.stackexchange",
"id": 59949,
"lm_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, general-relativity, special-relativity, virtual-particles",
"url": null
} |
ros-kinetic
Every ROS release will be supported on exactly one Ubuntu LTS.
Comment by Mike Scheutzow on 2021-07-01:
@trunc8 You should make your comment the answer.
unable to locate package problem on ubuntu 16
Your question title is misleading. You should always make your system's OS very clear in the question. In this case, your system OS is Ubuntu 20.04.
Kinetic packages are not available for Ubuntu 20.04. You can either use Kinetic on Ubuntu 16 via a virtualbox or install ROS Noetic on Ubuntu 20.04.
Quoting their releases page-
Every ROS release will be supported on exactly one Ubuntu LTS.
Originally posted by trunc8 with karma: 156 on 2021-07-01
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 36619,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-kinetic",
"url": null
} |
quantum-field-theory, renormalization, gauge-invariance, regularization, gauge
The requirement of covariant derivative in non-Abelian case for gauge invariance comes form the fact that in non-Abelian case the Yang-Mills field strength transform homogeneously under gauge transformation as $F\rightarrow UFU^{-1}$ as opposed to the Abelian case where it is gauge invariant. Covariant derivative has the same transformation law as the field under gauge transformation as $D\rightarrow UDU^{-1}$, so the combination $D_\mu F_{\mu\nu}$ will transform homogeneously which will not be the case if we use a partial derivative instead of covariant derivative. Under a trace term in the Lagrangian which includes a couple of terms like this one can use cyclic property of the trace to show that the term (like the one mentioned below) is unaffected by gauge transformation.
A requirement of gauge invariant term in the Lagrangian will involve higher covariant derivative term like $tr(\frac{1}{\Lambda^2}D_\alpha F_{\mu\nu}D_\alpha F_{\mu\nu})$ . | {
"domain": "physics.stackexchange",
"id": 33326,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, renormalization, gauge-invariance, regularization, gauge",
"url": null
} |
deep-learning, backpropagation
error_all.append(error)
if loop_iter % 10000 == 0:
print(error)
# plt.plot(error_all)
# plt.show()
x_all = x_data
y_all = [guess(x_i) for x_i in x_all]
plt.plot(x_all,y_all, '.')
plt.plot(x_data, y_data, '.')
plt.show() | {
"domain": "datascience.stackexchange",
"id": 1231,
"lm_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, backpropagation",
"url": null
} |
c++, template, cache
The only caveat I see is that the user of this class has to ensure that the lifetime of the cache goes beyond the lifetime of any contained managed object. Otherwise, the custom deleter would obviously cause undefined behaviour. The basic idea of your cache, as I understand it, is that it is a map of weak pointers connected to shared pointers with custom deleters that remove them from the map. As you noticed yourself, that's a risky pattern, because if any resources outlive the cache, you get UB. | {
"domain": "codereview.stackexchange",
"id": 31203,
"lm_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++, template, cache",
"url": null
} |
ros, target-link-libraries, cmake
Title: CMake error trying to link target to libraries
Dear All,
I am using Ubuntu 14.04 and ROS Indigo.
I have created a pkg named "joy" in which there are two source file named joystick.cpp and js_info.cpp under joy/src folder. also i have header file joystick.h under include/joy folder.
i have compiled that 3 files and they work correctly.
But when i placed this files as told you above, gives me error as shown below:
CMake Error at joy/CMakeLists.txt:61 (target_link_libraries):
Target "joystick" of type EXECUTABLE may not be linked into another target.
One may link only to STATIC or SHARED libraries, or to executables with the
ENABLE_EXPORTS property set.
-- Configuring incomplete, errors occurred!
See also "/home/darshan/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/darshan/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed | {
"domain": "robotics.stackexchange",
"id": 23285,
"lm_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, target-link-libraries, cmake",
"url": null
} |
javascript, angular.js
The controller loads the menubar (which will eventually fetch the items from the DB
app.controller('navController', ['$scope', '$location', function ($scope, $location) {
$scope.navigationTabs = [
new NAV("file","/file","File","fa fa-file-o", "active"),
new NAV("edit","/edit","Edit","fa fa-edit", "inactive"),
new NAV("view","/view","View","fa fa-search", "inactive"),
new NAV("hist","/history","History","fa fa-history", "inactive"),
new NAV("bmark","/bookmarks","Bookmarks","fa fa-bookmark-o", "inactive"),
new NAV("hlp","/help","Help","fa fa-life-buoy", "inactive")
];
...
}]); | {
"domain": "codereview.stackexchange",
"id": 19774,
"lm_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, angular.js",
"url": null
} |
rosserial-arduino, ros-indigo
Title: How to configure communication with arduino
Hi,
I'm trying to configure the communication using rosserial to arduino and to install everything.
I followed this tutorial http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
and am trying to finish this one http://wiki.ros.org/rosserial_arduino/Tutorials/Hello%20World
Here is the error I am getting, I just cannot locate serial_node.py anywhere on my computer!
rosrun rosserial_python serial_node.py /dev/ttyUSB0
[rosrun] Couldn't find executable named serial_node.py below /opt/ros/indigo/share/rosserial_python
I couldn't find anyone having the same issue, any advice would be greatly appreciated.
Thank you very much!
Originally posted by tomahawk077 on ROS Answers with karma: 16 on 2017-05-06
Post score: 0
I solved this issue, but now I cannot run helloworld for another reason:
sketchbook/libraries/ros_lib/Esp8266Hardware.h:36:25: fatal error: ESP8266WiFi.h: No such file or directory
#include <ESP8266WiFi.h> | {
"domain": "robotics.stackexchange",
"id": 27827,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosserial-arduino, ros-indigo",
"url": null
} |
The original confusion between total and order comes from a mistranslation of the word מלא in Hebrew, hence my answer dealing with both terms.
A total order is a partial ordering in which every two elements are comparable, that is to say what you wrote:
Let $(A,R)$ be a partially ordered set. We say that $R$ is a total order if for all $a,b$ one of the following is true:
1. $a=b$, or
2. $aRb$, or
3. $bRa$.
Due to the anti-symmetry of $R$, if both 2 and 3 hold we have that 1 holds, so if $a\neq b$ we must have that only one of the conditions hold.
A total order is also called linear often.
A complete partial order $(A,R)$ is a partial order such that for every nonempty $B\subseteq A$ there exists $y\in A$ such that:
1. $\forall x\in B, xRy$ (that is $y$ is an upper bound of $B$), and
2. $\forall a\in A\left(\forall x\in B\left(xRa\right)\rightarrow bRa\right)$ (every other upper bound of $B$ is an upper bound of $B\cup\lbrace y\rbrace$). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.960361158630024,
"lm_q1q2_score": 0.8124102554979141,
"lm_q2_score": 0.8459424334245618,
"openwebmath_perplexity": 342.5677096682026,
"openwebmath_score": 0.927019476890564,
"tags": null,
"url": "http://math.stackexchange.com/questions/83901/definition-of-total-partial-ordering/83906"
} |
c++, stream, c++20
for (uint32_t *ptr = reinterpret_cast<uint32_t *>(&data); n; ++ptr) {
sum += *ptr;
--n;
}
return sum;
}
uint32_t id = 0xfecaadbe;
uint32_t checksum = 0;
static constexpr std::size_t datasize{mysize - sizeof(Block::id) - sizeof(checksum)};
std::array<uint8_t, datasize> data;
}; | {
"domain": "codereview.stackexchange",
"id": 37546,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, stream, c++20",
"url": null
} |
c, file, io
Allow users different ways to supply input and output files, rather than hard coding the name of the input and output files into the code.
Provide guidance for users if the enter the wrong thing.
Improve the error handling.
There are at least 3 ways that input and output can be handled by a program like this if the program is being executed from the command line:
File redirection
Command line arguments
The program prompts the user for the input and output file names.
It should be noted that one program can use all 3 methods to be the most flexible.
If the user is using file redirection than the input is coming in on stdin and the output is going out on stdout, errors should go to stderr. In this case the code
FILE* file = stdin;
FILE* nFile = stdout; | {
"domain": "codereview.stackexchange",
"id": 39280,
"lm_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, io",
"url": null
} |
c++, beginner
The initialization would then be much more easily written:
std::fill(board.begin(), board.end(), UNFILLED_MARKER);
Note that this form would require the conversion of row,column coordinates but if this is placed in an object, that detail can easily be isolated to within the object.
Don't use ALL_CAPS for constants
The use ALL_CAPS for constants defined as macros has been common practice for decades. To avoid misleading readers of your program, non-macro constants should not be ALL_CAPS. See ES.9 for details. | {
"domain": "codereview.stackexchange",
"id": 40894,
"lm_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",
"url": null
} |
Where am I going wrong?
You count each distribution in which one box receives three balls and the others receive one three times, once for each way you could place one of those three balls first.
You count each distribution in which two of the boxes receive two balls and the other box receives one four times, once for each way you could place one of the two balls in each of the two boxes with two balls first.
Three balls in one box and one ball in each of the others: There are three ways to choose which box receives three balls, $\binom{5}{3}$ ways to choose which three balls are placed in that box, and $2!$ ways to distribute the remaining balls. Hence, there are $$\binom{3}{1}\binom{5}{3}2!$$ ways to distribute the balls so that three balls are placed in the same box. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9843363549643402,
"lm_q1q2_score": 0.840537368527786,
"lm_q2_score": 0.8539127548105611,
"openwebmath_perplexity": 122.18986063362453,
"openwebmath_score": 0.9724416732788086,
"tags": null,
"url": "https://math.stackexchange.com/questions/2452609/in-how-many-ways-can-5-balls-of-different-colours-be-placed-in-3-boxes-of-di"
} |
an approximate phase portrait for the nonlinear system. System of Differential Equations in Phase Plane. We have chosen a solution strategy based on the Figure 1. existence of stable states of motion for different initial conditions. 2 : Linear analysis of nonlinear pendulum : Mechanical systems model for a pendulum. We prove that the dynamical system does not have cycles on this surface. I Flowing along vector field, phase point traces out a solution. Python phase portrait. Question: Problem 2. The nonlinear response characteristics of the system, attributed to damper hysteresis and on-off control, were thoroughly analyzed considering the bifurcation diagrams, Lyapunov exponent spectra, phase portraits, and the Poincare maps. Below, several phase portraits are shown. All what you have to do is convert the ODE to state space and use function like StreamPlot. 1 Nonlinear Systems A general rst order autonomous (2 2) system has the following form x0 = f(x;y) (1) To make a rough sketch of | {
"domain": "colagrossijeans.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713891776498,
"lm_q1q2_score": 0.8273658508922132,
"lm_q2_score": 0.8397339656668287,
"openwebmath_perplexity": 567.4945903919495,
"openwebmath_score": 0.6094440817832947,
"tags": null,
"url": "http://colagrossijeans.it/kzgz/phase-portrait-nonlinear-system.html"
} |
c#
should be
var position = -1;
You should also use var when declaring foreach and for loop iterators.
e.g.
for (int i = min; i < max; i++)
should be:
for (var i = min; i < max; i++)
Design
I hate seeing methods with reference variables and a void return. Unless you have a really good reason to do so, you should be returning one of those parameters. In this case you can actually do away with passing either in by reference:
You don't appear to alter query at all, so you shouldn't pass it in using the ref keyword.
It doesn't really make sense to pass in weight at all. Each time you call this method you'll be appending the weight data to your weight collection. If that's by design, you should state that explicitly using an AddRange or Concat method once you have the results from this function, but not by doing it in the function. This hides it as a side effect from a programmer.
So you can instead return weight normally:
private static ICollection<int> GetResults(ref string[] query) | {
"domain": "codereview.stackexchange",
"id": 12412,
"lm_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
} |
gazebo, simulation, turtlebot, turtlebot-simulator
[ INFO] [1404322766.636610011]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Connected to gazebo master @ http:// 127.0.0.1:11345
Msg Publicized address: 10.227.80.208
process[laserscan_nodelet_manager-9]: started with pid [13920]
process[depthimage_to_laserscan-10]: started with pid [13926]
Floating point exception (core dumped)
[gazebo-2] process has died [pid 13782, exit code 136, cmd /opt/ros/hydro/lib/gazebo_ros/gzserver /opt/ros/hydro/share/turtlebot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/fastslam/.ros/log/cf107f7c-020f-11e4-bfba-e4115b24feb2/gazebo-2.log].
log file: /home/fastslam/.ros/log/cf107f7c-020f-11e4-bfba-e4115b24feb2/gazebo-2*.log
.............................
Error [ConnectionManager.cc:116] Failed to connect to master in 30 seconds. | {
"domain": "robotics.stackexchange",
"id": 18478,
"lm_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, simulation, turtlebot, turtlebot-simulator",
"url": null
} |
java, algorithm, multithreading, sorting, radix-sort
The final loops in areEqual() are fairly pedestrian. Even though modern JITs can do wonders, it seems like Arrays or some other module should offer direct access to memcmp(), since we just need to know if every bit of src matches the bits of dst. I have a concern about whether the current approach of iterating first over array items, then over arrays, would be as cache friendly as the order memcmp() would use. Benching it both ways would be instructive.
ParallelSortImpl might break out helpers to explicitly name each of the three phases. In three places it attempts .join() and then:
} catch (final InterruptedException ie) {
ie.printStackTrace();
return;
} | {
"domain": "codereview.stackexchange",
"id": 29961,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, algorithm, multithreading, sorting, radix-sort",
"url": null
} |
organic-chemistry, reaction-mechanism, biochemistry, proteins
Is it possible to make a reasonable prediction what would/not happen in the mixed glucose/insulin solution in the container?
Yes, in aqueous solution there is no expectation that a glycoprotein forms between insulin and glucose. In vivo, glycoproteins form in a coupled reaction involving the carbohydrate (usually an oligosaccharide rather than a single glucose), the protein and a nucleotide triphosphate.
However, if an individual has high blood sugar levels (i.e. high concentrations of glucose in the blood) for extended periods of time, hemoglobin (specifically, the N-terminal amino group and the sidechain amino group of lysine) will react with the sugar and become glycalated. This is used in the HbA1c diagnostic test for checking if someone has diabetes. After the sugar binds (reversibly), there is a further reaction (Amadori rearrangement) that leads to a long-lasting product. | {
"domain": "chemistry.stackexchange",
"id": 11773,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism, biochemistry, proteins",
"url": null
} |
c++, game, c++11, sdl
One size doesn't fit all (Stop sugar coating my globals)
In general I believe that this kind of resource manager should only be used for obtaining external resources such as textures, sounds etc. To me it looks like you're trying to sugar coat having global variables, because that's essentially what this is being used like in your example. Using it for SDL context is overkill, why would you want to shutdown SDL during any point of your program's lifetime? What is the point of having it managed as a resource over just a simple global?
In all honesty, I think you are over-engineering this. | {
"domain": "codereview.stackexchange",
"id": 6166,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, game, c++11, sdl",
"url": null
} |
c#, .net, unit-testing, interview-questions, numbers-to-words
public void Add_TwelveDecimalNumber_ReturnString(decimal number, string expected)
public void Add_ThirteenDecimalNumber_ReturnString(decimal number, string expected)
public void Add_NegativeNumber_ReturnString(decimal number, string expected) I'm going to focus only on IntToWords(), nothing else (although I think using ASP.NET MVC is considered a better practice than plain ASP.NET).
I can see several problems with that code: | {
"domain": "codereview.stackexchange",
"id": 2127,
"lm_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#, .net, unit-testing, interview-questions, numbers-to-words",
"url": null
} |
operators, symmetry, quantum-spin, gauge-theory, spinors
So I think that you have the full $U(2)$ symmetry, it's just more meaningful to talk about the $U(1)$ and $SU(2)$ parts separately as they have different physical meaning.
In the matrix above you can reparametrize the phases as $\phi_1=\phi+\psi$ and $\phi_2=\phi-\psi$ to decouple the global $U(1)$ rotation related to charge and the $SU(2)$ spin-rotation component:
$$
M = e^{i \phi}\begin{pmatrix}
e^{i \psi} & 0\\
0 & e^{-i \psi}\\
\end{pmatrix}
$$
So you do have both, it's just physically more meaningful to separate these. | {
"domain": "physics.stackexchange",
"id": 66974,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "operators, symmetry, quantum-spin, gauge-theory, spinors",
"url": null
} |
meteorology, climate, climate-change, volcanology, volcanic-hazard
Also, this site lists the acceptance of anthropogenic global warming from eighteen different scientific associations.I'm not sure politicians are the final authority for global warming.Edit: it has come to my attention that I did not actually answer the question posed in the title of this question, to wit: "Can volcanos change the climate?" I'll have to admit I did not. Taking the title and the body together as one topic I'll try to address the contribution volcanoes make to global warming.This site has this to say about the contribution of CO2 from volcanoes: | {
"domain": "earthscience.stackexchange",
"id": 856,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "meteorology, climate, climate-change, volcanology, volcanic-hazard",
"url": null
} |
electric-fields
Howewer
2.) I cannot understand the following idea.
What would happen, if two infinite homogeneous (both are + charged) zero thickness planes were approached to each other?
Because of the superposition principle, we can sum their electric field in a certain area, for example when we approach two this kind plane let choose two equal area from each plane which are parallel to one another. Therefore, eventually if two planes get too close, one another force will be something like that: $F_{A_1,A_2}(r\to 0)=\lim\limits_{r\to 0}k\dfrac{(A_1\sigma)(A_2\sigma)}{r^2}=\lim\limits_{r\to 0}\dfrac{Constant}{r^2}\to\infty$ | {
"domain": "physics.stackexchange",
"id": 47242,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-fields",
"url": null
} |
complexity-theory, np-hard, linear-programming
Title: Is 0-1 integer linear programming NP-hard when $c^T$ is the all-ones vector? Karp's 21 NP-complete problems show that 0-1 integer linear programming is NP-hard. That is, an integer linear program with binary variables.
If we set the $c^T$ vector of the objective $\text {maximize } c^Tx$ to all one (unweighted, i.e., $c^T=(1,1,\dots,1)$) is the problem still NP-hard? We can encode satisfiability of a SAT instance as the feasibility of a 0-1 integer linear program. For feasibility, the objective function doesn't matter, so you can impose whatever constraint you wish on it.
For an example of how to express boolean or, boolean and, and boolean negation in a 0-1 integer linear program, see Express boolean logic operations in zero-one integer linear programming (ILP). This is all that's needed to express a SAT instance as a 0-1 integer linear program. | {
"domain": "cs.stackexchange",
"id": 2205,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, np-hard, linear-programming",
"url": null
} |
kalman-filters
Sloshing can persist of course, even during brief stops. Adding a low pass filter / integrator to the sensor would improve instantaneous readings.
It would be interesting to obtain the Fourier Transform of the fuel level sensor signal while the vehicle is moving, provided that it is sampled quickly enough. Depending on your specifications for fuel level accuracy, you might find that a simple low pass filter / integrator might be equally effective in "dampening" the sloshing effect on the signal. This is how common "anti-slosh" modules work anyway.
Hope this helps. | {
"domain": "dsp.stackexchange",
"id": 5518,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "kalman-filters",
"url": null
} |
ros, catkin-make, include, ros-control, headers
Title: Modifying Catkin Include Order to use Source Package over Debian Package
I am attempting to use a custom set of ros_control headers (specifically for the controller_manager class) in a package that depends on nearly a dozen other packages, some of which I cannot modify. I am building the ROS ros_control package from source and I expected this to supersede the Debian version of ros_control, however, it is still using the Debian headers.
The problem appears to stem from the include path used by catkin_make. With verbosity turned on, catkin_make shows /opt/ros/indigo/include/ as the first include path. Ideally, this should be one of the last include paths. I'm guessing that one of my dependencies is messing up the include path, but I don't know find which one or if I can even modify the package.
How do I ensure that /opt/ros/indigo/include gets put at the end of the include path list? I would preferably like to only modify my current package's CMakeList.txt. | {
"domain": "robotics.stackexchange",
"id": 21039,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, catkin-make, include, ros-control, headers",
"url": null
} |
ros, roslisp
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package sam_begin_lisp written to:
[ rosmake ] /home/sam/.ros/rosmake/rosmake_output-20120814-162006/sam_begin_lisp/build_output.log
[rosmake-0] Finished <<< sam_begin_lisp [FAIL] [ 2.80 seconds ]
[ rosmake ] Halting due to failure in package sam_begin_lisp.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 10 packages with 1 failures. | {
"domain": "robotics.stackexchange",
"id": 10585,
"lm_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, roslisp",
"url": null
} |
beginner, programming-challenge, haskell, fizzbuzz
fizzBuzz :: (Int, Int, Int) -> [String]
fizzBuzz (f,b,end) = map (fizzBuzzSingle f b) [1..end]
convertInputLine :: String -> (Int, Int, Int)
convertInputLine x = packageInputs ((map read . words) x :: [Int])
packageInputs :: [Int] -> (Int, Int, Int)
packageInputs [f,b,end] = (f, b, end)
concatOutput :: [String] -> String
concatOutput (x : xs) =
foldl (\x y -> x ++ " " ++ y) x xs
handleFizzBuzz :: [String] -> [String]
handleFizzBuzz [] = []
handleFizzBuzz (x : xs) =
(concatOutput . fizzBuzz . convertInputLine $ x) : handleFizzBuzz xs
main :: IO ()
main = do
args <- getArgs
let path = args !! 0
file <- readFile path
putStrLn . unlines . handleFizzBuzz . lines $ file Some functions in the Prelude can be of help. One is map, which allows you to write a simpler handleFizzBuzz. Another is unwords, which is equivalent to your concatOutput.
handleFizzBuzz :: String -> String
handleFizzBuzz =
map $ unwords . fizzBuzz . convertInputLine | {
"domain": "codereview.stackexchange",
"id": 17113,
"lm_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, programming-challenge, haskell, fizzbuzz",
"url": null
} |
meteorology, temperature
An example of this are fog patches that you potentially pass through in certain conditions. The air in the fog patches is a little colder (or higher absolute humidity, for example over a lake) than the surrounding fog-free areas. Even if the air wasn't cold enough to form cloud, the same temperature variation can occur invisibly.
Here's an example from Wikimedia user Simo Räsänen: | {
"domain": "earthscience.stackexchange",
"id": 2600,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "meteorology, temperature",
"url": null
} |
vcf, phasing
Is this simply an artifact of how these truth sets were produced? For example, if the GRCh38 (haploid) FASTA was meant to be haplotype 1, then it makes sense that it's nearly identical to HG002's haplotype 1, and haplotype 2 has more differences. Is that the case, or are only certain variants phased (such as those that pass a minimum confidence threshold, or are in a high-quality BED region)? As the two alleles in a genotype are separated by / but not |, the main v4.2.1 VCF is not phased. The README says the phased VCFs are available in the SupplementaryFiles directory. It contains a few versions of VCFs with v4.2.1 genotype calls but with phasing from additional tools such as whatshap and hifiasm. I don't know which version is the most accurate, though. | {
"domain": "bioinformatics.stackexchange",
"id": 2171,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vcf, phasing",
"url": null
} |
ros, gazebo, rviz, move-group, ros-indigo
PARAMETERS
* /gazebo/quadrotor_aerodynamics/C_mxy: 0.074156208
* /gazebo/quadrotor_aerodynamics/C_mz: 0.050643264
* /gazebo/quadrotor_aerodynamics/C_wxy: 0.12
* /gazebo/quadrotor_aerodynamics/C_wz: 0.1
* /gazebo/quadrotor_propulsion/CT0s: 1.53819048398e-05
* /gazebo/quadrotor_propulsion/CT1s: -0.00025224
* /gazebo/quadrotor_propulsion/CT2s: -0.013077
* /gazebo/quadrotor_propulsion/J_M: 2.5730480633e-05
* /gazebo/quadrotor_propulsion/Psi: 0.00724217982751
* /gazebo/quadrotor_propulsion/R_A: 0.201084219222
* /gazebo/quadrotor_propulsion/alpha_m: 0.104863758314
* /gazebo/quadrotor_propulsion/beta_m: 0.549262344778
* /gazebo/quadrotor_propulsion/k_m: -7.01163190977e-05
* /gazebo/quadrotor_propulsion/k_t: 0.0153368647144
* /gazebo/quadrotor_propulsion/l_m: 0.275
* /ground_truth_to_tf/frame_id: /odom_combined
* /ground_truth_to_tf/odometry_topic: ground_truth/state
* /ground_truth_to_tf/tf_prefix:
* /move_group/Quadrotore/kinematics_solver: kdl_kinematics_pl... | {
"domain": "robotics.stackexchange",
"id": 27128,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, gazebo, rviz, move-group, ros-indigo",
"url": null
} |
javascript, jquery, validation, form, html5
background-color: rgba(207, 254, 168, 0.2)!important;}
.invalid {
border-color: #f7a716!important;
background-color: white;
background-color: rgba(255, 213, 0, 0.13)!important;
background-image: url(http://leftdeaf.com/ppi/quote/new/img/warning.png)!important;
background-position: 98% 50%;
background-size: 28px 28px;
background-repeat: no-repeat;
box-shadow: inset 0 3px 3px -3px white;
color: #b63910!important
} | {
"domain": "codereview.stackexchange",
"id": 33062,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, validation, form, html5",
"url": null
} |
# Probability - Conditional statements with union and intersection
There are two flowers, $A$ and $B$.
The probability that each one is pollinated is $0.8$.
The probability that $B$ is pollinated given $A$ is pollinated is $0.9$.
What is the probability that:
a) both flowers are pollinated?
b) one or the other or both is pollinated?
c) A is pollinated given that B is?
d) A is pollinated but B is not?
for a), my rationale is that $P(A) = 0.8$, and $P(B) = 0.8$, so $P(A \cap B) = P(A)P(B) = 0.64$. should I be taking into account the conditional statement somehow?
for b), I'm thinking the statement is literally just the identity of a union of two events, so $P(A \cup B)$, which would be $P(A) + P(B) - P(A \cap B) = 0.8 + 0.8 - 0.64 = 0.96$?
for c), $P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{0.64}{0.8} = 0.8$. Is this right?
for d), $P(A \cap B') = P(A)P(B') = (0.8)(0.2) = 0.16$. is this right? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9773708022739579,
"lm_q1q2_score": 0.8267994424258722,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 378.69686333197205,
"openwebmath_score": 0.8362767696380615,
"tags": null,
"url": "https://math.stackexchange.com/questions/817138/probability-conditional-statements-with-union-and-intersection"
} |
library, coffeescript
Title: A library written in CoffeeScript So, I wrote this small library for fast DOM building with API tailored for CoffeeScript
I feel like the code overall can be made better/smaller/faster.
I am also not particularly happy about a few functions, namely:
# Parses out css classes and id from string like:
# p#warning.big.yellow # => p # attr {"id": "warning", "class": ['big', 'yellow']}
# #container # => div # attr {"id": "container"}
# @returns node name (e.g. "span")
dotHashRe = /[.#]/
parseElem = (elem, attr) ->
return elem unless dotHashRe.test elem
attr['class'] ||= []
attr['class'] = [attr['class']] if typeof attr['class'] == 'string'
elem = "div#{elem}" if dotHashRe.test(elem.charAt(0))
pieces = elem.split(dotHashRe)
elemType = pieces.shift()
pos = elemType.length
classes = attr['class']
for piece in pieces
if elem.charAt(pos) == '#'
attr['id'] = piece
else | {
"domain": "codereview.stackexchange",
"id": 544,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "library, coffeescript",
"url": null
} |
python, scikit-learn, cross-validation, class-imbalance, smote
The first reason why such a procedure is invalid is that, this way, some of the duplicates due to upsampling will end up both to the training and the validation splits (CV folds); the result being that the algorithm is validated with some samples that have already been seen during training, which invalidates the very fundamental requirement of a validation set (fold) and it is actually the very definition of data leakage. For more details, see own answer in the SO thread Process for oversampling data for imbalanced binary classification; quoting from there: | {
"domain": "datascience.stackexchange",
"id": 8335,
"lm_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, scikit-learn, cross-validation, class-imbalance, smote",
"url": null
} |
electromagnetism, electromagnetic-radiation, waves, reflection, boundary-conditions
Title: Phase shift of 180 degrees of transversal wave on reflection from denser medium Can anyone please provide an intuitive explanation of why phase shift of 180 degrees occurs in the Electric Field of a EM wave, when reflected from an optically denser medium?
I tried searching for it but everywhere the result is just used.The reason behind it is never specified. This is a general property of waves. If you have waves reflecting off a clamped point (like waves running on a string that you pinch hard at one point), the waves get phase inverted. The reason is the principle of superposition and the condition that the amplitude at the clamped point is zero. The sum of the reflected and transmitted wave must be the amplitude of oscillation at all points, so that the reflected wave must be phase inverted to cancel the incoming wave. | {
"domain": "physics.stackexchange",
"id": 77663,
"lm_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, electromagnetic-radiation, waves, reflection, boundary-conditions",
"url": null
} |
quantum-mechanics, dirac-delta-distributions
Title: A formula for delta function in quantum mechanics I met a formula for delta function in a QM book ( not in English). The formula is used in the scattering theory. Its form is
$$\lim_{\alpha\rightarrow \infty}\exp[i\alpha x]=2i\delta(x), ~~(x\geq 0).$$ Before, I never saw this form. Is this formula correct? Where can I find relevant references?
Supplementary note:
The above formula may be wrong. In a problem set I find a proof for a similar formula:
$$\lim_{\alpha\rightarrow \infty}\alpha\exp[i\alpha x]=2i\delta(x), ~~(x\geq 0).$$
This proof refers to the book "Quantum collision theory" by C.J.Joachain, Chapter 3.
Now I paste the proof here.
Assuuming $f(x)$ is a slowly-varying function of $x$. We have
$$\int_{-a}^af(x)\delta(x)dx=f(0),~~(a>0)$$ and
$$\int_{0}^af(x)\delta(x)dx=f(0)/2,~~(a>0).\tag{1}$$
Then we consider an integral
$$I=\int_0^a\alpha f(x)e^{i\alpha x}dx,~~(\alpha\rightarrow \infty).$$ | {
"domain": "physics.stackexchange",
"id": 56538,
"lm_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, dirac-delta-distributions",
"url": null
} |
javascript, game, html, css, rock-paper-scissors
1.2 Accessibility & Semantics
You tried to use semantic tags wherever possible. However, you paid no extra attention to accessibility beyond that.
Sections should always have a headline ranging from h2 to h6 that also works as a label for that section. If no headline is used, then a standard div would be more appropriate. W3C will flag a missing headline.
A p stands for paragraph. It is an element to contain flow text and displays that content in a block form. It is not an appropriate use to use it for single words or the display of a score. In fact, displaying the score is a semantic task for the output element while an output element should have a label. An appropriate code use would be:
<div class="computer-score">
<label class="computer" for="computer-score">COMPUTER</label>
<output class="score-computer" id="computer-score">0</output>
</div> | {
"domain": "codereview.stackexchange",
"id": 44730,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, game, html, css, rock-paper-scissors",
"url": null
} |
java, graphics, canvas
public void run() {
add(create_tower(700, 250));
add(create_tower(150, 250));
add(create_main_home(300, 350));
add(create_s_tower(1000, 550));
add(create_s_tower(1200, 550));
add(create_s_tower(1400, 550));
add(create_door(475, 750));
add(create_window(350, 450));
add(create_window(550, 450));
add(create_arch(150, 250));
add(create_arch(700, 250));
add(create_s_arch(1000, 550));
add(create_s_arch(1200, 550));
add(create_s_arch(1400, 550));
add(create_arch_door(475, 750));
add(create_house_arch(300, 350));
}
} There is not much to optimize but the following will still speed up things:
final double tower_width = 150;
-------------------------------------------------- Compiler can fill in better
private static final double TOWER_WIDTH = 150;
And
GRect create_tower(double x, double y) {
-------------------------------------------------- Compiler can inline method body
private GRect createTower(double x, double y) { | {
"domain": "codereview.stackexchange",
"id": 29032,
"lm_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, graphics, canvas",
"url": null
} |
reproduction, digestion, sexual-reproduction
Flower pollen:
Non-bee pollen are called flower pollen. Extensive health relevant research has been conducted on pollen prepartions from non-bee pollen. It is marketed under names such as Cernitron, Cernitol, etc. It is known to decrease prostrate hyperteophy in rats, but there was no relevant changes in blood levels of LH, FSH, testosterone or dihydro-testosterone.
In patients with prostatic adenoma the improvement was in nycturie, important decreases in the residue post-urinate and in long term treatment, also decrease in the diameter antero-posterior of prostate. The urinary debit did not suffer any changes. The effect on the other symptoms usual in the hyperthrophie benign of prostate was not of statistical significance (Bruneton, 1999).[Source 1](Page 7)
For industrial benefit: | {
"domain": "biology.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": "reproduction, digestion, sexual-reproduction",
"url": null
} |
abstract data structures: •Binary Search Tree, AVL Tree, Red-Black Tree, Heaps. Insertion Sort works as follows: The first step involves the comparison of the element in question with its adjacent element. We know that there are searching algorithms with time complexity O(lgn) but is there any sorting algorithm with time complexity O(lgn)? Stack Exchange Network Stack Exchange network consists of 177 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build. Computational complexity of sort on comparison model. we have Time Complexity Intro to Searching -. When preparing for technical interviews in the past, I found myself spending hours crawling the internet putting together the best, average. So the time complexity will be-O(n)+O(k)=O(n+k) Where n will be the array length to be sorted and k will be the range i. The following table contains information about the analysis of the Counting Sort | {
"domain": "associazioneculturart.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102524151827,
"lm_q1q2_score": 0.8298136572034452,
"lm_q2_score": 0.8577681031721325,
"openwebmath_perplexity": 925.4757654217474,
"openwebmath_score": 0.3923802375793457,
"tags": null,
"url": "http://eawi.associazioneculturart.it/counting-sort-time-complexity-analysis.html"
} |
I have been unable to verify Parseval's theorem with certain such "recipes" (including with answers coming from the MathWorks team, see below. For math, science, nutrition, history. Formally, there is a clear distinction: 'DFT' refers to a mathematical transformation or function, regardless of how it is computed, whereas 'FFT' refers to a specific. The interval at w. We then are supposed to filter out any frequencies above 200 and below 500, take the inverse transform, and plot the resulting graph against the approximation y = 0. On this page, the Fourier Transforms for the sinusois sine and cosine function are determined. The fast Fourier transform algorithm requires only on the order of n log n operations to compute. Learn more about fourier transform, gaussian, pulsed signal, spectrum. There is also the discrete-time Fourier transform (DTFT) which under some stimulus conditions is identical to the DFT. also, tried fft, doesn't work as well $\endgroup$ - user107761 Nov 14 '14 at 8:17 | {
"domain": "koehler-paderborn.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682451330956,
"lm_q1q2_score": 0.8322862814528735,
"lm_q2_score": 0.8418256432832333,
"openwebmath_perplexity": 499.8126290305673,
"openwebmath_score": 0.8244264721870422,
"tags": null,
"url": "http://ocve.koehler-paderborn.de/transform-fourier-matlab.html"
} |
If not explain why, If so find its inverse matrix. For example, if f (x) and g (x) are inverses of each other, then we can symbolically represent this statement as: g(x) = f − 1 (x) or f(x) = g −1 (x) One thing to note about inverse function is that, the inverse of a function is not the same its reciprocal i.e. The inverse function would mean the inverse of the parent function or any other function. Inverse functions are a way to "undo" a function. Bijective functions have an inverse! Determining the inverse then can be done in four steps: Decide if f is bijective. Step 3: Graph the inverse of the invertible function. MARK M, it is NOT true that all functions have inverses. https://www.khanacademy.org/.../v/determining-if-a-function-is-invertible Only one-to-one functions have inverses. The Ohio State University linear algebra 2568 exam problem. How to Tell If Two Functions Are Inverses, How to Tell if a Function Has an Inverse Function (One-to-One). rewrite it as x = an expression | {
"domain": "sieradskillc.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399034724604,
"lm_q1q2_score": 0.820767112485837,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 497.20810804489844,
"openwebmath_score": 0.5982497334480286,
"tags": null,
"url": "http://sieradskillc.com/9r3k1o2h/di466.php?358081=how-to-determine-if-a-function-is-invertible"
} |
time const marbleSample = getRandomMarble(marbles, picks); function getRandomMarble(marbles, picks) { var marbleSample = []; for (let i = 0; i. The probability of one event occurring is quantified as a number between 0 and 1, with 1 representing certainty, and 0 representing that the event cannot happen. Find the probability of each event. The probability will actually stay the same because the number of red marbles will become 10, the total number in the bucket will be 24, so the probability is now 10/24. For example, if you have a jar of 4 marbles, 2 yellow, 1 green, and 1 red, the probability of choosing a red marble is 1 4 =25%. probability that all three were born on Wednesday. 8a: Understand that, just as with simple events, the probability of a compound event is the fraction of outcomes in the sample space for which the compound event occurs. GROHE in your Market. In both of these experiments, the outcomes are equally likely to occur. Please enter the necessary parameter values, | {
"domain": "mirtillhouse.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806512500486,
"lm_q1q2_score": 0.8128413523663707,
"lm_q2_score": 0.8289388040954683,
"openwebmath_perplexity": 667.2365926197297,
"openwebmath_score": 0.6545421481132507,
"tags": null,
"url": "http://mirtillhouse.it/probability-simulator-marbles.html"
} |
We show that this procedure takes $O(V^3)$ time to update the transitive closure for any sequence of $n$ insertions:
• There cannot be more than $|V|^2$ edges in $G$, so $n \le |V|^2$.
• Summed over $n$ insertions, the time for the outer for loop header and the test for $t_{iu} == 1$ and $t_{iv} == 0$ is $O(nV) = O(V^3)$.
• The last three lines, which take $O(V^2)$ time, are executed only $O(V^2)$ times for $n$ insertions. To see why, notice that the last three lines are executed only when $t_{iv}$ equals $0$, and in that case, the last line sets $t_{iv} = 1$. Thus, the number of $0$ entries in $T$ is reduced by at least $1$ each time the last three lines run. Since there are only $|V|^2$ entries in $T$, these lines can run at most $|V|^2$ times.
• Hence, the total running time over $n$ insertions is $O(V^3)$. | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98697950682225,
"lm_q1q2_score": 0.8046177580707979,
"lm_q2_score": 0.8152324871074608,
"openwebmath_perplexity": 218.20308305904163,
"openwebmath_score": 0.8872612118721008,
"tags": null,
"url": "https://walkccc.github.io/CLRS/Chap25/Problems/25-1/"
} |
c#, .net, socket, tcp
Code:
using System;
using System.IO;
using System.Net.Sockets;
namespace SocketsClientLiveTest
{
internal class Client
{
private static void Main(string[] args)
{
int connectionAttempts = 1;
int allowedAttempts = 10;
bool connectionSuccess = false;
TcpClient client = new TcpClient();
while (connectionAttempts <= allowedAttempts)
{
Console.WriteLine("Attempting connection, attempt: {0} of {1}", connectionAttempts.ToString(), allowedAttempts.ToString());
try
{
client = new TcpClient("192.168.15.32", 4040);
Console.WriteLine("Successful connection on attempt {0}", connectionAttempts);
Console.WriteLine("Attempting to read..."); | {
"domain": "codereview.stackexchange",
"id": 42402,
"lm_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#, .net, socket, tcp",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.