text stringlengths 1 1.11k | source dict |
|---|---|
physical-chemistry, equilibrium, concentration
So, in the end of your second method, while applying the correct formula for $K_\mathrm c$, you must add those $x$ and $x$ together, and then write:
$$K_\mathrm c=\frac{(x+x)\times(x+x)}{(2-x)\times(2-x)}$$
into the formula you were using. | {
"domain": "chemistry.stackexchange",
"id": 9687,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, equilibrium, concentration",
"url": null
} |
# What is the theme of analysis?
It is safe to say that every mathematician, at some point in their career, has had some form of exposure to analysis. Quite often, it appears first in the form of an undergraduate course in real analysis. It is there that one is often exposed to a rigorous viewpoint to the techniques of calculus that one is already familiar with. At this stage, one might argue that real analysis is the study of real numbers, but is it? A big chunk of it involves algebraic properties, and as such lies in the realm of algebra. It is the order properties, though, that do have a sort of analysis point of view. Sure, some of these aspects generalise to the level of topologies, but not all. Completeness, for one, is clearly something that is central to analysis.
Similar arguments can be made for complex analysis and functional analysis. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850867332735,
"lm_q1q2_score": 0.8037452792094641,
"lm_q2_score": 0.8175744806385542,
"openwebmath_perplexity": 234.25783139901176,
"openwebmath_score": 0.9116273522377014,
"tags": null,
"url": "https://math.stackexchange.com/questions/3257398/what-is-the-theme-of-analysis/3257421"
} |
It is hard to predict what the effect will be of all these algorithms interacting in the market. They are just too complex. Computer “panic” could erase wealth in seconds. A small bug could cost you (or someone else) their life savings. The very speed for which algorithmic trading is designed also poses much of its danger. The algorithms can spiral out of control very quickly and do a lot of damage before humans can intervene.
The ugly
Algorithmic trading has turned investment into a war. The algorithms compete against each other, each attempting to gain some advantage over the others. Paul Kedrosky calls them “battle bots”. A part of the strategy of some algorithms appears to be to send a large number of quotes into the market, merely to overwhelm and confuse competitor algorithms. Will other traders be the collateral damage of this war that is fought on our markets? | {
"domain": "johandp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9891815497525024,
"lm_q1q2_score": 0.8064129350055449,
"lm_q2_score": 0.8152324871074607,
"openwebmath_perplexity": 1228.7598934244872,
"openwebmath_score": 0.5641108155250549,
"tags": null,
"url": "http://blog.johandp.com/2011/08/"
} |
hash
Title: Universal hashing function probability Can somebody explain the following:
(source: fbcdn.net)
U is a universe of keys, and H is a finite collection of hash functions mapping U to {0, 1, … , m-1}.
I do not understand definition 2, and thus why amount of funtions that map x and y to the same location is given by |H|/m. Let’s begin by talking about the intuition for universal hash families. Intuitively, a family of hash functions is universal if for any distinct objects x and y that you’d like to hash, if you select a random hash function from the hash family, the probability that you get a collision between those two elements is at most 1/m, where m is the number of buckets. In other words, universal hash families tend to spread elements out in a way where the probability of a pair colliding is the same as if the elements were distributed randomly.
Let’s see how the definition accomplishes this. Here’s the definition from your question: | {
"domain": "cs.stackexchange",
"id": 14155,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "hash",
"url": null
} |
quantum-mechanics, experimental-physics, quantum-information, research-level, wavefunction-collapse
So in this setup, we will generally have the detector clicking rapidly, and the system repeatedly being reset to $\lvert G\rangle$ via this variant of the Zeno effect. But because the measurement is not truly continuous, there is a small chance the detector suddenly stops clicking. This is random and not deterministic, so the experiment does nothing to resolve the measurement problem. But since the detector is only coupled to the system probabilistically via the Rabi oscillation to the bright state, this does not constitute a measurement that the system is in $\lvert D\rangle$ - we only become increasingly sure it is not purely in $\lvert G\rangle$ the longer we don't observe a click. This is not a strong measurement, it is a variant of a weak measurement. So when the detector stops clicking, we have some superposition of $\lvert G\rangle$ and $\lvert D\rangle$, but the detector often stops for much longer than one would expect if the system was just Rabi oscillating into $\lvert | {
"domain": "physics.stackexchange",
"id": 78551,
"lm_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, experimental-physics, quantum-information, research-level, wavefunction-collapse",
"url": null
} |
Infinite series can be daunting, as they are quite hard to visualize. It is a theorem that this always works within the radius of convergence of the power series. ] Also find the associated radius of convergence. Since 2 x2 > 1 when jxj > 1 or jxj > 1 (and the same for <), the RC of the new power series is 1 as well. The power series converges absolutely at every point of the interval of convergence. RADIUS OF CONVERGENCE In previous explainations there is a number R so that power series will converge for , |x – a|< R and will diverge for |x – a|> R. Any combination of convergence or divergence may occur at the endpoints of the interval. 2 answers 2. We have step-by-step solutions for your textbooks written by Bartleby experts!. Instead, it may be either a convergent series not in Taylor series form (such as a Frobenius series) or it may be a. com - View the original, and get the already-completed solution here! The problem is to determine the radius of convergence of the Taylor Series | {
"domain": "tunup.fr",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526436103748,
"lm_q1q2_score": 0.8193975780811791,
"lm_q2_score": 0.826711791935942,
"openwebmath_perplexity": 259.4769035586787,
"openwebmath_score": 0.9378222823143005,
"tags": null,
"url": "http://qwvm.tunup.fr/radius-of-convergence-taylor-series.html"
} |
plate capacitor with circular plates of radius R = 16. TASK NUMBER 6. 0 F with plates separated by 1. Using Gauss' Law, We can evaluate E, the electric field between the plates once we employ an appropriate gaussian surface. At the beginning, the plates have a charge Q0 and -Q0. The Farad, F, is the SI unit for capacitance, and from the definition of capacitance is seen to be equal to a Coulomb/Volt. The problem of determining the exact solution for the potential due to a circular parallel plate capacitor is a celebrated one (Sneddon 1966), with the most successful discussion to date being that by Love (1949), in which the mathematical problem is recast in terms of a Fredholm integral equation of the second kind over a finite domain. As x goes from 0 to 3d (a) the magnitude of the electric field remains the same. 0 cm in diameter is accumulating charge at the rate of 32. In a parallel plate capacitor, C = [A*Er*9. The diagrams show parallel plate capacitors with different shaped | {
"domain": "condominiroma.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822876987039989,
"lm_q1q2_score": 0.8206851969426149,
"lm_q2_score": 0.8354835330070838,
"openwebmath_perplexity": 560.6556688462676,
"openwebmath_score": 0.6646321415901184,
"tags": null,
"url": "http://chsz.condominiroma.it/circular-parallel-plate-capacitor.html"
} |
electromagnetism, electric-circuits, electric-fields, speed-of-light, poynting-vector
Title: Veritasium Electricity Follow-Ups: Insulators, Switch Location, larger gap This question is similar to:
Doesn't Veritasium's Recent Video About Circuits Violate The Speed Of Light?
In what order would light bulbs in series light up when you close a long circuit?,
but seeks to build upon them.
Veritasium source question link:
https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA/community?lb=Ugkx0is4qHkf1fIgTCpW2A_zu5wbJuObvflK
Copied here:
,_____|L|_____, _
| | | 1m
\_____|B|_/ __/ -
|-------------|
1 lightyear
L = Light bulb
B = Battery
Part 1
Would the result be different if there existed a "perfect insulator" of infinite "height out of page" in between the cables?
eg:
,_____|L|_____, _
|~~~~~~~~~~~~~| | 1m
\_____|B|_/ __/ -
|-------------|
1 lightyear
L = Light bulb
B = Battery
~ = perfect insulator | {
"domain": "physics.stackexchange",
"id": 83997,
"lm_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, electric-circuits, electric-fields, speed-of-light, poynting-vector",
"url": null
} |
ros, ros2, python3
# Convert back to yaml
values_dictionary = yaml.safe_load(pose_string)
restored = Pose()
set_message_fields(restored, values_dictionary)
print("Restored x, y, z: ", restored.position.x, restored.position.y, restored.position.z)
Originally posted by ijnek with karma: 460 on 2022-04-06
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Flash on 2022-04-06:
@ijnek tried the method you mentioned. Restoring values doesn't work when data is stored in Pose_string format. So I used JSON datatype on the database. It needs a little more modifications to accommodate that.
after converting it to YAML using message_to_yaml
data_string = yaml.safe_load(data)
data_string = json.dumps(data_string, indent=4)) | {
"domain": "robotics.stackexchange",
"id": 37561,
"lm_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, ros2, python3",
"url": null
} |
fluid-dynamics, computational-physics, simulations, turbulence
So, the production of turbulent kinetic energy is proportional to the gradient of the mean velocity. And where is the gradient of the mean velocity largest in a boundary layer? Right against the wall!
To put everything together, right against the wall there is little to no turbulence (it depends on how close "right against" really means of course), but there are strong gradients in the mean velocities. So the turbulent kinetic energy is small, but it is being produced quite strongly. There is little dissipation of turbulent kinetic energy, because there is not much turbulent kinetic energy there yet -- however, there is strong dissipation of resolved kinetic energy, because that is where the mean velocity is driven to zero. | {
"domain": "physics.stackexchange",
"id": 73457,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, computational-physics, simulations, turbulence",
"url": null
} |
homework-and-exercises, newtonian-mechanics, forces, newtonian-gravity, free-body-diagram
Indeed, but your interpreting it wrong. Put it this way,
The force on A due to B is equal and opposite to the force on B due to A. The key point being that the action-reaction pairs are forces on different objects. Not the same object. (the box)
Let us identify the action reaction pairs -
The normal force on the box by the ramp is at an inclined angle, perpendicular to the ramp. And the normal force on the ramp by the box exactly opposite in direction, inclined downwards.
The gravitational force on the box by the earth which points straight down. And the gravitational force on the earth by the box which points straight up.
So the normal force on the box is not an action-reaction pair with gravity.
To put it inline with your question, | {
"domain": "physics.stackexchange",
"id": 84545,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, forces, newtonian-gravity, free-body-diagram",
"url": null
} |
-
+1: Yes, this is a standard use of the trace function in finite fields of characteristic two. Well done! – Jyrki Lahtonen Jul 7 '12 at 12:28
This answer is to supplement Hurkyl's answer. I give examples of such polynomials for all the finite fields of characteristic two. I need the basic result, brought up by Hurkyl, stating that $\ker\, tr=\mathrm{Im}(x^2-x)$. This follows from rank-nullity, because the mappings $$tr:\mathbb{F}_{2^k}\rightarrow \mathbb{F}_2,x\mapsto\sum_{i=0}^{k-1}x^{2^i}$$ and $$f:\mathbb{F}_{2^k}\rightarrow\mathbb{F}_{2^k},x\mapsto x^2-x$$ are both linear over the prime field, satisfy $tr(x)=tr(x^2)$, for all $x$, $tr\circ f=0$, $tr\not\equiv0$ and that $\ker f=\{0,1\}$ is one-dimensional (if you didn't know this I HIGHLY recommend proving these facts as exercises). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226287518852,
"lm_q1q2_score": 0.8284836846333584,
"lm_q2_score": 0.8479677545357568,
"openwebmath_perplexity": 219.45359484144095,
"openwebmath_score": 0.9578136205673218,
"tags": null,
"url": "http://math.stackexchange.com/questions/167802/polynomial-over-characteristic-two-finite-field-of-odd-degree-with-certain-image"
} |
rosmake, osx
In this case I would suggest you ensure you have cppunit installed and try building orocos_kdl by itself (rosmake orocos_kdl). | {
"domain": "robotics.stackexchange",
"id": 13110,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosmake, osx",
"url": null
} |
the graph is shifted to the left by $$p$$ units. I noticed that they were mainly accurate for their purposes, but some were lost because they were forced to make both decisions: how to change the parameter (i. Explore the relationship between the equation and the graph of a parabola using our interactive parabola. then 1 <=x. The unit step function, also known as the Heaviside function, is defined as such:. The "a" indicates the width of the parabola -- the closer l a l (the absolute value of a) is to zero, the wider the arc will be. Find the vertex. Vertical and Horizontal Shifts of Quadratic Graphs Algebra Quadratic Equations and Functions. 5(x-1)2 - 3 has a minimum of -3. Convert parabolas to standard form. In the Desmos activity, the task was to enter an equation of a parabola that would go through a set of three points. Write a rule for g. Common Core Algebra II is eMathInstruction's third offering. Quadratic equation worksheets with answer keys free s quadratic equation | {
"domain": "ilcampanileborgo.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961607027984,
"lm_q1q2_score": 0.8024884496641916,
"lm_q2_score": 0.8080672158638528,
"openwebmath_perplexity": 1001.6224286250655,
"openwebmath_score": 0.4225013554096222,
"tags": null,
"url": "http://zatq.ilcampanileborgo.it/shift-parabolas.html"
} |
Eigen Pairs
In this section, let us develop our understanding of linear transformation by breaking it down into simpler linear transformations.
• Let $T$ be a linear transformation from $\mathbb {R}^n$ to $\mathbb {R}^n$.
Suppose:
• $B$ is a basis of $\mathbb {R}^n$
• $V$ is the span of some of the vectors in $B$
• $W$ is the span of the remaining vectors in $B$.
Then:
• Any vector in $\mathbb {R}^n$ can be written as the sum of a vector $v$ in $V$ and a vector $w$ in $W$.
• Since $T(v + w) = T(v) + T(w)$, we can see how $T$ behaves on all of $\mathbb {R}^n$ if we know how it behaves on $V$ and on $W$.
• This decomposition is particularly helpful if $V$ and $W$ are chosen so that $T$ behaves in a simple way on $V$ and on $W$. | {
"domain": "nm.dev",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9925393580808595,
"lm_q1q2_score": 0.8271074609582388,
"lm_q2_score": 0.8333245973817158,
"openwebmath_perplexity": 728.6994757688325,
"openwebmath_score": 0.9852852821350098,
"tags": null,
"url": "https://nm.dev/courses/introduction-to-data-science/lessons/linear-algebra/topic/eigen-value-and-matrix-diagonalization/"
} |
algorithms, search-algorithms, agent-based-computing
It covers both "Asymmetric Rendezvous" (in Section 4) and "Symmetric Rendezvous" (in Section 5).
For symmetric rendezvous, the paper by Alpern shows:
It is shown how symmetries in the search region may hinder the process by preventing coordination based on concepts such as north or clockwise. | {
"domain": "cs.stackexchange",
"id": 5898,
"lm_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, search-algorithms, agent-based-computing",
"url": null
} |
virtual-memory, memory-allocation
Title: Buddy system allocator and slab allocator in Linux kernel In the Silberschatz's book "operating systems" the author talks about the allocation of memory via system buddy and slab.
My first question is: in the book, both memory allocation methods are described as allocation method that the kernel use to allocate memory only for kernel's process, not for user's process. Is it true?
My second question, as the title suggest, regards the allocation method that is implemented inside the Linux kernel. Looking the website kernel.org I've seen that there is a chapter dedicated to buddy system and a page dedicated to slab. So, I imagine that both are present inside the kernel, but what is one method for and what is the other for? A modern operating system manages physical memory as page frames. A page frame can be allocated to a user process or for the kernel to use for its own purposes, such as to allocate its own data structures. | {
"domain": "cs.stackexchange",
"id": 20096,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "virtual-memory, memory-allocation",
"url": null
} |
ros, ros-melodic, installation, catkin, packages
Title: How to install single packages in a workspace?
In our project we have certain packages that are custom and required to run our system, but which do not need to be rebuilt during everyday development. I would like to designate them to be "installed", so that they are built from source, but catkin clean does not remove them.
I know that you can call make install in the build directory of your workspace (and in single packages) as described in the tutorial to create packages in the install directory, but as it is also deleted by catkin clean, I don't see the use.
I found this and this answer, but they seem to deal with building from source, not with "installing" in the sense that I mean it. There are also other questions like this, but they seem to either not apply or be outdated. | {
"domain": "robotics.stackexchange",
"id": 33578,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-melodic, installation, catkin, packages",
"url": null
} |
ros-kinetic
}
BOXS.header.stamp=input_msg.header.stamp;
BOXS.header.frame_id = "velodyne";
pub_box_msg.publish(BOXS);
}
protected:
ros::Subscriber sub_custom_msg;
ros::Publisher pub_box_msg;
};
int main(int argc, char **argv)
{
ros::init(argc, argv, "object_box"); //노드명 초기화
ROS_INFO("started object_box");
ROS_INFO("SUBTOPIC : ");
ROS_INFO("PUBTOPIC : ");
velodyne_ hello;
ros::spin();
}
i want to show up box with object
ex)
i know min_x,y,z , max_x,y,z so i have 8 points of bound box how i can bounding object with jsk msg?
i can publish some image but doesnt match size and position | {
"domain": "robotics.stackexchange",
"id": 31576,
"lm_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
} |
ros, prosilica-camera
[ INFO] [1308043480.950345618]: Found camera, guid = 37112
[ WARN] [1308043480.951187554]: Failed to load intrinsics from camera
terminate called after throwing an instance of 'prosilica::ProsilicaException'
what(): Couldn't get range of attribute StreamBytesPerSecond: Camera was unplugged
[prosilica_driver-2] process has died [pid 9455, exit code -6].
log files: /home/iis-xs/.ros/log/1ee20ff0-9668-11e0-92a6-705ab6776520/prosilica_driver- 2*.log
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
The IP address in prosilica.launch is the good one. Any idea what could be the origin of this error ?
Thank you very much, | {
"domain": "robotics.stackexchange",
"id": 5830,
"lm_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, prosilica-camera",
"url": null
} |
when all terms in the series are positive. Therefore, all passive safety features necessary to simulated accident scenarios (loss of coolant accident [LOCA] and non-LOCA) are included in the design. 2 The integral psychograph is based on the notion that human beings have multiple distinct interior ca-. Integral Test Solution. Integration is the algebraic method of finding the integral for a function at any point on the graph. Since the numerator is always$1\$ and positive, and the denominator is always positive, and the sequence of terms is decreasing we can apply the integral test here. Imagine this scenario… your plant has just undergone a major rehabilitation of its electrical system. To date our community has made over 100 million downloads. The Comparison Test for Improper Integral Convergence/Divergence. Enter Diverges If The Integral Div. Resolución # 03. As we have previ: ously stated, such a series converges when. Where the integral test falls, and does not give us an answer, | {
"domain": "carrosseriesayoduval.fr",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018426872777,
"lm_q1q2_score": 0.8105322318081508,
"lm_q2_score": 0.8311430478583168,
"openwebmath_perplexity": 729.8619265918579,
"openwebmath_score": 0.8300469517707825,
"tags": null,
"url": "http://opnc.carrosseriesayoduval.fr/integral-test.html"
} |
complexity-theory, computability, recursion, order-theory
$$
which is at least $n$ for $n \geq 4$. Therefore for $n \geq 4$, we have
$$
K(n-\sqrt{n})^{3/2} + Kn^{3/4} + Cn \leq Kn^{3/2} - Kn + Kn^{3/4} + Cn.
$$
For $n \geq 16$, we have $n^{3/4} = n \cdot n^{-1/4} \leq 16^{-1/4} n = n/2$, and so
$$
K(n-\sqrt{n})^{3/2} + Kn^{3/4} + Cn \leq Kn^{3/2} + (C-K/2)n,
$$
which is at most $Kn^{3/2}$ if $K \geq 2C$. | {
"domain": "cs.stackexchange",
"id": 17130,
"lm_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, computability, recursion, order-theory",
"url": null
} |
2: Intermediate Value Theorem for Derivatives. A function is differentiable if the limit of the difference quotient, as change in x approaches 0, exists. UNIFORM CONTINUITY AND DIFFERENTIABILITY PRESENTED BY PROF. BHUPINDER KAUR ASSOCIATE PROFESSOR GCG-11, CHANDIGARH . Differentiability Implies Continuity If is a differentiable function at , then is continuous at . infinity. Continuity. Then This follows from the difference-quotient definition of the derivative. Nevertheless, Darboux's theorem implies that the derivative of any function satisfies the conclusion of the intermediate value theorem. Note To understand this topic, you will need to be familiar with limits, as discussed in the chapter on derivatives in Calculus Applied to the Real World. Differential coefficient of a function y= f(x) is written as d/dx[f(x)] or f' (x) or f (1)(x) and is defined by f'(x)= limh→0(f(x+h)-f(x))/h f'(x) represents nothing but ratio by which f(x) changes for small change in x and can be understood | {
"domain": "oscarfalk.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137874059599,
"lm_q1q2_score": 0.8423401126384558,
"lm_q2_score": 0.8577681122619883,
"openwebmath_perplexity": 922.7839848678535,
"openwebmath_score": 0.9041855335235596,
"tags": null,
"url": "http://oscarfalk.com/dc95nd/8e3611-differentiability-implies-continuity"
} |
research, hri, uncanny-valley
If you are interested in this area, I'd probably look at how people suffering from autism process faces in general. In this area, there have been a number of studies using real faces (e.g. Scholar search autism "facial features"), as well as artificial faces (e.g. Scholar search autism cartoon faces). This difference in decoding facial expressions might explain why they seem to not feel the effects of the uncanny valley the same way other people do.
As for Kaspar in particular, Blow et al. (2006) goes into some detail on the design decisions involved in Kaspar's face. Also, in a YouTube video, Kaspar's creators cite predictability and simplicity as some of the reasons for his particular design.
References: | {
"domain": "robotics.stackexchange",
"id": 265,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "research, hri, uncanny-valley",
"url": null
} |
java, object-oriented, calculator
public double makeCalculation() {
Operation operationMapValue = null;
if (operationMap.containsKey(operation)) {
operationMapValue = operationMap.get(operation);
System.out.println(operationMap.get(operation));
} else {
System.out.println("Invalid sign");
}
return operationMapValue.calculateResult(operand1, operand2);
}
}
Operation interface:
package com.company;
public interface Operation {
double calculateResult(double left, double right);
}
One of implementing classes:
package com.company;
public class Addition implements Operation {
@Override
public double calculateResult(double left, double right) {
return left + right;
}
}
And Tests:
package com.company;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class CalculatorTest {
Calculator calc = new Calculator(6.0, 2.0, '+'); | {
"domain": "codereview.stackexchange",
"id": 36945,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, object-oriented, calculator",
"url": null
} |
algorithms, sorting
$^*$ For example, with a Word-RAM model with $w \ge \log n$.
$^{**}$ Notice that this is consistent with practice. If you have any sense, you would set $b$ to be a power of two in an implementation. | {
"domain": "cs.stackexchange",
"id": 11140,
"lm_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, sorting",
"url": null
} |
ros
if (i == 360) i = 0;
}
return 0;
} | {
"domain": "robotics.stackexchange",
"id": 27124,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
trees, disjoint-sets
Is the article trying to say that a deletion is not possible with a similar time complexity as the optimized find/union (Inverse Ackermann function as the amortized running time)? Because a blanket statement that deletion is not possible seems like a stretch. There's nothing inherent in the data structure that prevents a deletion operation as long as it restructures the forest. It would be expensive when operating on a non-flattened set, but that isn't the same as not being possible.
Or am I overlooking something that (for instance) would make edge deletion an NP operation? The tree structure of a Disjoint Set doesn't have enough data to perform a deletion. | {
"domain": "cs.stackexchange",
"id": 19540,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "trees, disjoint-sets",
"url": null
} |
type-theory, functional-programming, typed-lambda-calculus, parametricity
$$f \, r\, x = \mathrm{Left}\,(k\,r\,x)$$
The function $f$ satisfies its relational naturality law because it's equivalent to that of $k$, as we have seen.
So, the set of all purely parametric $k$ of type "Left" is in a one-to-one correspondence with the set of all purely parametric $f$ that always return "Left".
Similarly, the set of all purely parametric $k$ of type "Right" is in a one-to-one correspondence with the set of all purely parametric $f$ that always return "Right".
We have shown that there are no $f$ that sometimes return "Left" and sometimes return "Right". So, the entire type $\forall r.\, N\,r\to P\,r+Q\,r$ is in a one-to-one correspondence with the entire type $(\forall r.\, N\,r\to P\,r)+\forall r.\, N\,r\to Q\,r$.
Q.E.D.
Examples of non-disjunctive type constructors | {
"domain": "cstheory.stackexchange",
"id": 5762,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "type-theory, functional-programming, typed-lambda-calculus, parametricity",
"url": null
} |
homework-and-exercises, special-relativity
$\Delta t_{signal}\cdot c = x_s + \Delta t_{signla}\beta c$ (1)
so
$\Delta t_{signal}=\frac{x_s}{(1-\beta)c}$
But how exactly come they up with (1)?
Edit: I do see that it actually makes sense, but still. A more detailed way to get there would be nice. Even if it's a basic problem. There's nothing specific to relativity in the answer. It's just kinematics in the $S$ frame. So imagine a similar situation at lower speed: you have two runners, the slower one gets a head start. At $t = 0$, the slower one is at $x = x_s$, the faster one at $x = 0$. The faster one's $x$ position as a function of time: $v_{faster} t$. The slower one's: $x_s + vt$. You want to know at what time they're at the same position, so set them equal and solve for $t$. | {
"domain": "physics.stackexchange",
"id": 37578,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, special-relativity",
"url": null
} |
c#, protocols
Utilities
public static class ParseUtils
{
private static readonly Dictionary<Type, Delegate> _parsers =
new Dictionary<Type, Delegate>()
{
{ typeof(int), (Func<string, int?>)ParseInt },
{ typeof(decimal), (Func<string, decimal?>)ParseDecimal },
{ typeof(double), (Func<string, double?>)ParseDouble },
{ typeof(float), (Func<string, float?>)ParseFloat },
{ typeof(DateTime), (Func<string, DateTime?>)ParseDateTime },
{ typeof(Guid), (Func<string, Guid?>)ParseGuid }
};
public static int? ParseInt(this string value)
{
int v;
if (int.TryParse(value, out v))
{
return v;
}
return null;
}
public static float? ParseFloat(this string value)
{
float v;
if (float.TryParse(value, out v))
{
return v;
}
return null;
} | {
"domain": "codereview.stackexchange",
"id": 26502,
"lm_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#, protocols",
"url": null
} |
between skew lines is equal to the length of the perpendicular between the two lines. You must make note that the shortest distance between parallel lines is actually the length of the perpendicular between them or joining the two lines. Shortest Distance between two lines in the 3D plane. Is this in 2 dimensions? Line passing through the point B(a2,b2,c2) parallel to the vector V2(p2,q2,r2) Point B (,,) Vector V2 (,,) Shortest distance between two lines(d) The distance between two parallel planes is understood to be the shortest distance between their surfaces. Online space geometric calculator to find the shortest distance between given two lines in space, each passing through a point and parallel to a vector. The distance between two skew lines is naturally the shortest distance between the lines, i.e., the length of a perpendicular to both lines. It should be pretty simple to see why intuitively. The line1 is passing though point A (a 1 ,b 1 ,c 1 ) and parallel to vector V 1 and | {
"domain": "hostalitecloud.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464492044004,
"lm_q1q2_score": 0.8195353859832181,
"lm_q2_score": 0.8397339696776499,
"openwebmath_perplexity": 298.37283224419957,
"openwebmath_score": 0.7286778688430786,
"tags": null,
"url": "http://www.hostalitecloud.com/trombone-drawing-dojphho/611a7a-shortest-distance-between-two-parallel-lines"
} |
python, interview-questions
stdscr.addch(tile.y, tile.x, " ", \
curses.color_pair(color))
else: stdscr.addch(tile.y, tile.x, ".", \
curses.color_pair(1))
player.rack.append(tile.letter)
tiles = []
redrawRack(player.rack, stdscr)
elif a == 4: # User has made an invalid word (we need
# a separate case because if this has happened the rack
# has already been removed)
turnObject = previousTurn
turnCounter = player
tiles = []
else:
turnObject = a
if player.index < numPlayers - 1:
turnCounter = players[player.index + 1]
elif player.index == numPlayers - 1:
turnCounter = players[0]
else: | {
"domain": "codereview.stackexchange",
"id": 2237,
"lm_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, interview-questions",
"url": null
} |
c#
source = source.Where(predicate);
}
return source;
}
/// <summary>
/// Starts a fluent chain of mapping filters to object types.
/// </summary>
public static Filters Configure()
{
return new Filters();
}
/// <summary>
/// Class to contain all filter mapping information.
/// </summary>
protected class FilterMapping
{
public Type SearchType { get; set; }
public Type ModelType { get; set; }
public Type FilterType { get; set; }
public Expression SearchPropertySelector { get; set; }
public Expression FilterPropertySelector { get; set; }
}
}
You shouldn't have to compile this on every search:
(mapping.SearchPropertySelector as Expression<Func<TVM, object>>).Compile() | {
"domain": "codereview.stackexchange",
"id": 16776,
"lm_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
} |
special-relativity, time-dilation
Title: Time dilation when observed from each frame I have just begun with special relativity so pardon me if my question seems too obvious.
In the books I am following, there is an example of time dilation which says:
The half life of muons is $\tau$(in the proper frame of muon). We have muon beam moving with a speed of $0.999 c$ and so the time taken for the beam intensity to reduce to half ,in the lab frame, would be $\tau \gamma$ where $\gamma$ is the Lorentz factor for this beam. | {
"domain": "physics.stackexchange",
"id": 51779,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, time-dilation",
"url": null
} |
electromagnetism, electric-circuits, electric-current, electromagnetic-induction, inductance
I wanted to confirm whether both the cases, as illustrated in the picture, are correct.
Note that both solenoids form the right screw. No translation or rotation in 3D-space may possibly turn a right screw into a left screw, or other way around. If they were a bolt with the head on the left, following the arrows would move the bold to the left from a fixed nut. That's all you need to know to confirm that both pictures show the same solenoid.
Ignore the leads to avoid confusion: if there is current in the wire, then there is some way it's supplied to the solenoid, it's just outside of the frame of the picture. Roughly,
You're looking at the same screw, not dead-on to the side, but slightly from the right on the top picture, from left on bottom.
can we say that one of these diagrams is more accurate than the other?
You know the answer already: no.
if we curl the fingers of our right hand in the direction of current … the field is towards the left inside the solenoid … right?
Right! | {
"domain": "physics.stackexchange",
"id": 99510,
"lm_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, electric-circuits, electric-current, electromagnetic-induction, inductance",
"url": null
} |
Set of zero divisors of $F(X,R)$ : $\{f\in F(X,R) : f(x)\in B\;\forall x\in X\}$.
Your answer for the units of $F(X,R)$ is correct. But your answer for the zero divisors isn't.
By definition, $f\in F(X,R)$ is a zero divisor iff there exists some function $g\in F(X,R)$, $g\neq0$ (as a function!) such that $fg$ is the identically zero function, i.e. $f(x)g(x)=0$ for all $x\in X$. Note that the condition that $g$ is not the zero function does NOT preclude it from having some zero values — as long as it has at least one non-zero value, it's a non-zero function. For example, if we pick some specific $a\in X$ and $r\in R$, $r\neq0$, then the function defined as $$g(a)=r, \quad g(x)=0 \text{ for all } x\neq a$$ is a non-zero function, isn't it? So your answer to the zero divisors question needs to be corrected, because the $\forall$ quantifier there is wrong. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9615338123908151,
"lm_q1q2_score": 0.813402260542986,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 74.0305572977213,
"openwebmath_score": 0.8940383791923523,
"tags": null,
"url": "https://math.stackexchange.com/questions/2887317/set-of-zero-divisors-and-the-set-of-units-of-the-ring-of-functions-from-x-to"
} |
1 2cosacosbcosc - Mathematics - TopperLearning. Use these fundemental formulas of trigonometry to help solve problems by re-writing expressions in another equivalent form. h=b·sin A=a·sin B So, b/sin B=a/sin A Using a perpendicular from A to BC, we can show that b/sin B=c/sin C Hence we have the Sine Rule: [2. Figure 1: {\bf a} \cdot{\bf b} = ab\cos\theta. cos(A) = b/c. From the investigation above, we know that $$\cos (\alpha – \beta) e \cos \alpha – \cos \beta$$. 6157 21) cos 61° 0. 615) = 1 √ 3 This is very straightforward to solve. sin(b) cos(6) b = sin(t), this tells us how to exponentiate a rotation matrix. ) sin A = 8/17, tan B = 5/12, A and B in Q1 Draw the picture of angle A in the first quadrant Q1, and since the sine is opposite/hypotenuse or y/r, and since we are given sin A = 8/17, make y=8 and r=17, and calculate x using the Pythagorean theorem: x²+y² = r² x²+8² = 17² x² Solution: Using sin a sin B = 1/2 [ cos ( a - b) - cos ( a + b) ] we get, \ sin 55 0 sin 40 0 = 1/2 [ | {
"domain": "burgerfi8518.site",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806523850542,
"lm_q1q2_score": 0.8354084306694132,
"lm_q2_score": 0.8519527982093666,
"openwebmath_perplexity": 3452.214131882267,
"openwebmath_score": 0.8957402110099792,
"tags": null,
"url": "https://zlsuzb.burgerfi8518.site/cos-a-cos-b.html"
} |
2. Originally Posted by karush
$\tiny{{s4}.{13}.{5}.{41}}$
$\textsf{find if planes are$\parallel, \perp$or$\angle$of intersection }\\$
\begin{align}
\displaystyle
{P_1}&={x+z=1}\\
\therefore n_1&=\langle 1,0,1 \rangle\\
\\
{P_2}&={y+z=1}\\
\therefore n_2&=\langle 0,1,1 \rangle\\
\\
\cos(\theta)&=
\frac{n_1\cdot n_2}{|n_1||n_2|}\\
&=\frac{1(0)+0(1)+1(1)}
{\sqrt{1+1}\cdot\sqrt{1+1}}
=\frac{1}{2}\\
\cos^{-1}\left({\frac{1}{2}}\right)&=
\color{red}{60^o}
\end{align}
$\textit{there are 2 more problems like this so presume this is best method.. }\\$
$\textit{didn't know if it is common notation to call a plane$P_1$}$
Everything you've posted is fine. You can give a plane any name you like, but I would write something like this:
\displaystyle \begin{align*} P_1 : x + z = 1 \end{align*} | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544007,
"lm_q1q2_score": 0.8647099470465943,
"lm_q2_score": 0.8807970670261976,
"openwebmath_perplexity": 1682.2355830237636,
"openwebmath_score": 0.9061705470085144,
"tags": null,
"url": "http://mathhelpboards.com/calculus-10/s4-13-5-41-relation-2-planes-20440.html?s=9278ceb6188b675b9c2ddddfeb0e6f5e"
} |
c#, beginner, playing-cards
if (Card2 == "_9Diamonds")
{
pictureBox2.Image = Resources._9Diamonds;
}
if (Card2 == "_10Diamonds")
{
pictureBox2.Image = Resources._10Diamonds;
}
if (Card2 == "JDiamonds")
{
pictureBox2.Image = Resources.JDiamonds;
}
if (Card2 == "QDiamonds")
{
pictureBox2.Image = Resources.QDiamonds;
}
if (Card2 == "KDiamonds")
{
pictureBox2.Image = Resources.KDiamonds;
}
if (Card2 == "AHearts")
{
pictureBox2.Image = Resources.AHearts;
}
if (Card2 == "_2Hearts")
{
pictureBox2.Image = Resources._2Hearts;
}
if (Card2 == "_3Hearts")
{
pictureBox2.Image = Resources._3Hearts;
} | {
"domain": "codereview.stackexchange",
"id": 15429,
"lm_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, playing-cards",
"url": null
} |
quantum-field-theory, renormalization, feynman-diagrams, perturbation-theory, regularization
Title: Why are loop-induced processes finite without counter terms? When a process has no tree-level contribution to the amplitude but occurs e.g. at 1-loop level it is said to be loop-induced. One property of loop induced processes is when you calculate the amplitude there are no counter terms from renormalization. Therefore the amplitude is "inherently finite", why? When renormalizing you introduce counterterm diagrams of lower loop order, constructed from counterterm interactions. Importantly, during renormalization you do not introduce any interactions that were not in the Lagrangian in the first place.
So, if there are no tree diagrams to begin with, you also do not have any counterterm diagrams that would contribute at the same order as one-loop diagrams, and you have no way of cancelling potential UV divergences. Your process therefore has to be free of these divergences, since otherwise it would be unphysical. | {
"domain": "physics.stackexchange",
"id": 70214,
"lm_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, feynman-diagrams, perturbation-theory, regularization",
"url": null
} |
database-theory, relational-algebra, finite-model-theory
Example: $R$'s schema is $(A_{1}, A_{2}, A_{3})$, $S$'s schema is $(A_{2}, A_{3}, A_{4})$, and we have that $R = \{(1, 2, 3), (4, 5, 6)\}$ and $S = \{(2, 3, 4), (2, 3, 6)\}$. By (1) and (2) we get the intermediate result $\{(1, 2, 3, 4),(1, 2, 3, 6), (1, 2, 3, \epsilon),(4, 5, 6, \epsilon)\}$. By (3) we must remove $(1, 2, 3, \epsilon)$, since we have (for instance) $(1, 2, 3, 4)$ and $s = 4 \neq \epsilon = w$. We are thus left with $\{(1, 2, 3, 4), (1, 2, 3, 6), (4, 5, 6, \epsilon)\}$, the expected result for a left join.
Theorem: R LEFT JOIN S is equivalent to (R EQUIJOIN S) UNION ((((PROJECT_T R) DIFFERENCE (PROJECT_T S)) EQUIJOIN R) JOIN w).
Proof: (R EQUIJOIN S) gives us everything required by (1) and (2a). We claim that ((((PROJECT_T R) DIFFERENCE (PROJECT_T S)) EQUIJOIN R) JOIN w) gives us everything of the form (r, t, w) required by (2b) and (3). | {
"domain": "cs.stackexchange",
"id": 1449,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "database-theory, relational-algebra, finite-model-theory",
"url": null
} |
derivatives give the slope of tangent lines to the traces of the function. Therefore, the first component becomes a 1 and the second becomes a zero because we are treating $$y$$ as a constant when we differentiate with respect to $$x$$. The first derivative of a function of one variable can be interpreted graphically as the slope of a tangent line, and dynamically as the rate of change of the function with respect to the variable Figure $$\PageIndex{1}$$. 67 DIFFERENTIALS. Section 3 Second-order Partial Derivatives. These show the graphs of its second-order partial derivatives. Partial Derivatives and their Geometric Interpretation. Both of the tangent lines are drawn in the picture, in red. In the next picture, we'll change things to make it easier on our eyes. a tangent plane: the equation is simply. The first step in taking a directional derivative, is to specify the direction. We can write the equation of the surface as a vector function as follows. Purpose The purpose of this lab | {
"domain": "ochorvatsku.cz",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147201714923,
"lm_q1q2_score": 0.8226068841217686,
"lm_q2_score": 0.8459424431344437,
"openwebmath_perplexity": 277.3219350886113,
"openwebmath_score": 0.8812790513038635,
"tags": null,
"url": "http://www.apartaments.ochorvatsku.cz/vzq0gvh/01cny.php?id=03f69c-geometric-interpretation-of-second-order-partial-derivatives"
} |
lambda-calculus, type-theory, types-and-programming-languages
Title: Some points about type checking of simply typed $\lambda$-calculus? type checking
I was preparing examples of type checking in simply typed $\lambda$-calculus. I wanted to explain it to my audience in the way of implementation. And I found a bit tricky point in the typing rule of application, which is as follows.
$$
\frac {\Gamma \vdash t_1:T_{11}\rightarrow T_{12} \quad \Gamma \vdash t_2:T_{11}}
{\Gamma \vdash t_1 \, t_2 :T_{12} }
$$
$$
\frac {\Gamma, x:T_1 \vdash t_2 :T_2}
{\Gamma \vdash \lambda x:T_1.t_2 : T_1 \rightarrow T_2}
$$
Typing rules for booleans are:
$$
\frac {}
{\Gamma \vdash \texttt{true}: bool }
$$
$$
\frac {}
{\Gamma \vdash \texttt{false}: bool }
$$
My question | {
"domain": "cs.stackexchange",
"id": 10738,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lambda-calculus, type-theory, types-and-programming-languages",
"url": null
} |
inorganic-chemistry
Title: Why doesn't oxygen replace chlorine? If oxygen is more electronegative why doesn't it replace chlorine in compounds?
Example:
$\ce{2NaBr + Cl2 -> 2NaCl + Br2}$
works, while
$\ce{4NaCl + O2 -> 2Na2O + 2Cl2}$
doesn't. You can displace chlorine from hydrogen chloride.
With sodium chloride, if you did form sodium oxide it would be a strong base. As such it extracts a $\ce{Cl^+}$ moiety from any potential chlorine molecules. Sodium chloride is oxidized by oxygen, but the oxidized chlorine ends up as chlorine oxyanions such as hypochlorite (i.e., oxide coordinated to chlorine). | {
"domain": "chemistry.stackexchange",
"id": 9609,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry",
"url": null
} |
bash
to be invoked:
$ monitor_and_build src/ | {
"domain": "codereview.stackexchange",
"id": 41121,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bash",
"url": null
} |
c, image, bitwise, portability
// DOES THIS WORK WITH BIG ENDIAN AS WELL?
uint8_t *rawData = malloc((3*width+overhead)*height);
uint32_t i, currRow, currColumn, oi;
if (rawData == NULL)
return -1;
for (currRow = height, i = 0; currRow > 0; currRow--) {
for (currColumn = 0; currColumn < width; currColumn++) {
rawData[i++] = rgbData[3*width*(currRow-1) + 3*currColumn + 2];
rawData[i++] = rgbData[3*width*(currRow-1) + 3*currColumn + 1];
rawData[i++] = rgbData[3*width*(currRow-1) + 3*currColumn];
}
for (oi = 0; oi < overhead; oi++) {
rawData[i++] = 0;
}
}
fwrite(rawData, (3*width+overhead)*height, 1, outputFile);
// ->
// RGB1 RGB2
// RGB3 RGB4
//
// ->
// RGB3 RGB4 OVERHEAD[2]
// RGB1 RGB2 OVERHEAD[2]
free(rawData);
fclose(outputFile);
return 0;
} | {
"domain": "codereview.stackexchange",
"id": 18375,
"lm_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, image, bitwise, portability",
"url": null
} |
orbit
So yes, you can actually have planetary orbits, or any orbits, circular. There's nothing forbidding that. It's just pretty unlikely that this will occur via a natural process.
As indicated elsewhere, in the real world, all orbits and trajectories are a bit imperfect due to perturbations - whether they be elliptical, circular, parabolic or hyperbolic, they are always a bit perturbed by external factors. In many cases, perturbations are so tiny that you can ignore them.
When a planet is orbiting the Sun, and the orbit is elliptical, the Sun will be in one of those two focal points; the other point has no particular signification. If you could circularize that orbit, then the Sun would be in the center of the circle, of course.
Kepler's laws remain valid for a circular orbit:
The orbit of every planet is an ellipse with the Sun at one of the two foci.
Still true. A circle is an ellipse where the foci coincide. | {
"domain": "astronomy.stackexchange",
"id": 4911,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "orbit",
"url": null
} |
forces, approximations, regularization, molecular-dynamics
$$E = \sum_{i,j} f(r_{ij})*t(r_{ij})$$
How do we handle force term then? Is it the differentiation of the whole term as written above or is it the differentiation of $\sum_{i.j}f(r_{ij})$ and then multiplied separately by the same cutoff function. It is necessary to differentiate the whole thing. Monitoring the energy conservation is an essential aspect of MD simulation algorithms, and this will not even be possible in principle if the forces are not derived from the actual potential energy. So you need both terms: $f'(r)t(r) + f(r)t'(r)$ where $'$ represents the derivative (and then you multiply by the appropriate vector to give the gradient and hence the force). | {
"domain": "physics.stackexchange",
"id": 52096,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, approximations, regularization, molecular-dynamics",
"url": null
} |
earth-observation
Source: Bezděk, Aleš, and Josef Sebera. "Matlab script for 3D visualizing geodata on a rotating globe." Computers & Geosciences 56 (2013): 127-130.
The above image is by the author of the image. The title says what the image shows, which is the geoid height. The legend shows that the variation from the highest to lowest geoid height is less than 200 meters. Compare that with the 19.777 km altitude difference between the highest mountain above sea level and the deepest trench below sea level. The image shows the Tibetan plateau as below the reference ellipsoid and shows the Java trench (not visible in the above) as above the reference ellipsoid. This is not a world without oceans.
So what does the image show? | {
"domain": "earthscience.stackexchange",
"id": 2093,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "earth-observation",
"url": null
} |
c++, graph, c++17, data-visualization, fltk
Graph_lib::Color get_shuffled_color()
{
static int selection = 0;
auto color = Graph_lib::Color::black;
switch (selection)
{
case 0:
color = Graph_lib::Color::red;
break;
case 1:
color = Graph_lib::Color::blue;
break;
case 2:
color = Graph_lib::Color::dark_green;
break;
case 3:
color = Graph_lib::Color::magenta;
break;
case 4:
color = Graph_lib::Color::dark_magenta;
break;
case 5:
color = Graph_lib::Color::dark_yellow;
break;
case 6:
color = Graph_lib::Color::dark_blue;
break;
case 7:
color = Graph_lib::Color::black;
break;
default:
color = Graph_lib::Color::red;
selection = 0;
}
++selection;
return color;
}
} | {
"domain": "codereview.stackexchange",
"id": 31860,
"lm_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++, graph, c++17, data-visualization, fltk",
"url": null
} |
c#, algorithm, complexity
public Labyrinth(int exitPosition)
{
_nSteps = 0;
_currentPosition = 0;
_exitPosition = exitPosition;
}
public bool MoveRight()
{
_nSteps++;
_currentPosition++;
return _currentPosition == _exitPosition;
}
public bool MoveLeft()
{
_nSteps++;
_currentPosition--;
return _currentPosition == _exitPosition;
}
}
}
The strategy evaluator (which just counts the total number of steps taken to solve a fixed set of labyrinths)
using System; | {
"domain": "codereview.stackexchange",
"id": 16916,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, algorithm, complexity",
"url": null
} |
on}\\ & \text{in pool} & \text{committee} & \text{subcommittee}\\ \hline \text{students} & n & m+r-s & r\\ \text{teachers} & n & m+r & r\\ \text{administrators} & n+s & m+r & r\\ \end{array}$$ while in this section, the parameters are $$\begin{array}{l|ccc} & \text{number} & \text{number on} & \text{number on}\\ & \text{in pool} & \text{committee} & \text{subcommittee}\\ \hline \text{students} & n-r & m & s\\ \text{teachers} & n+s & m & s\\ \text{administrators} & n+s & m+r+s & s\\ \end{array}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978712645102011,
"lm_q1q2_score": 0.802439969032687,
"lm_q2_score": 0.8198933293122507,
"openwebmath_perplexity": 295.65221679273634,
"openwebmath_score": 0.9460882544517517,
"tags": null,
"url": "https://math.stackexchange.com/questions/20749/the-hexagonal-property-of-pascals-triangle"
} |
homework-and-exercises, general-relativity, metric-tensor, coordinate-systems
Title: Coordinate transformations of the metric tensor
Let's have metric (it describes the space-time of uniformly accelerating observer in Minkowski space-time)
$$
ds^2 = v^2du^2 - dv^2. \qquad (.0)
$$
I need to find expressions for $u = f(x, t), v = g(x, t)$, which leads to
$$
ds^2 = dt^2 - dx^2, \quad u = f(x, t), \quad v = g(x, t).
$$
How to get $f, g$? | {
"domain": "physics.stackexchange",
"id": 42293,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, general-relativity, metric-tensor, coordinate-systems",
"url": null
} |
ros, gazebo, catkin-make, catkin, cmake
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_CameraControl
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_RobustControllerStatus
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_AssemblyStates
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_SolvePositionIK
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_EndpointState
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_ITBState
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_AnalogOutputCommand
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_EndpointStates
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_DigitalOutputCommand
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_NavigatorStates
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_ListCameras
[ 0%] Built target _baxter_core_msgs_generate_messages_check_deps_AssemblyState | {
"domain": "robotics.stackexchange",
"id": 18804,
"lm_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, catkin-make, catkin, cmake",
"url": null
} |
c#, async-await
Title: Async access to School I have this class with two public async methods, which also calls some private methods that are async.
Here's the class:
public class AggregatedDataService
{
public IPrincipal User
{
get { return HttpContext.Current.User; }
}
public object SessionToken { get { return HttpContext.Current.Session["session_token"]; } }
private static string baseUrl = ConfigurationManager.AppSettings["baseURI"];
private readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public async Task<OrganizationAggregatedInfo> GetOrganizationAggregatedInfo(int organizationId)
{
var organization = await GetOrganization(organizationId);
var organizationContact = await GetOrganizationContact(organization.ID);
var associations = await GetOrganizationAssociations(organization.ID); | {
"domain": "codereview.stackexchange",
"id": 15846,
"lm_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#, async-await",
"url": null
} |
mathematics, kepler, johannes-kepler
Title: How did Kepler come to the potencies in his Third Law? How did Kepler come to the conclusion, that exactly the square of the period and the third potency of the great semi-axis of the ellipse is proportional?
Why is only square divided by cubic = constant? Why do other dimensions not work? Kepler certainly did not simply try all potencies.
Isn't this a similar problem to Fermat's last theorem? If you plot the log of the period against the log of the semi-major axis then it is obvious that $P^2 \propto a^3$. Any other power law relationship simply wouldn't fit.
The following passage (from https://www.mathpages.com/rr/s8-01/8-01.htm ) seems relevant: | {
"domain": "astronomy.stackexchange",
"id": 4571,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematics, kepler, johannes-kepler",
"url": null
} |
python, numpy, data-visualization
16985.30, 22214.70, 0.00, 0.00, 0.00, 112.50, 0.00, 0.00, 72.00, 135.00, 1.00, B=135, 10.0, N
17070.90, 22526.70, 0.00, 0.00, 0.00, 179.80, 0.00, 0.00, 84.00, 135.00, 1.00, B=135, 10.0, N
17139.60, 22546.70, 0.00, 0.00, 0.00, 238.10, 0.00, 0.00, 96.00, 135.00, 1.00, B=135, 10.0, N
17320.80, 22484.00, 0.00, 0.00, 0.00, 299.10, 0.00, 0.00, 108.00, 135.00, 1.00, B=135, 10.0, N
17398.80, 22275.50, 0.00, 0.00, 0.00, 330.90, 0.00, 0.00, 120.00, 135.00, 1.00, B=135, 10.0, N
17798.80, 22231.60, 0.00, 0.00, 0.00, 342.80, 0.00, 0.00, 132.00, 135.00, 1.00, B=135, 10.0, N
18224.00, 22234.00, 0.00, 0.00, 0.00, 339.50, 0.00, 0.00, 144.00, 135.00, 1.00, B=135, 10.0, N
18391.90, 22246.30, 0.00, 0.00, 0.00, 292.10, 0.00, 0.00, 156.00, 135.00, 1.00, B=135, 10.0, N
18690.00, 22221.70, 0.00, 0.00, 0.00, 233.00, 0.00, 0.00, 168.00, 135.00, 1.00, B=135, 10.0, N | {
"domain": "codereview.stackexchange",
"id": 25979,
"lm_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, numpy, data-visualization",
"url": null
} |
f#, rss
let channelElementValue name =
innerText channelNode name
The name parameter is not self-explanatory, I would personally call it elementName, element, or elName. (Abbreviations are acceptable in F#.) Also, once we've rewritten our innerText I think it can read more expressively: channelNode |> innerText name.
Finally, I see:
Items = itemNodes |> Seq.map(itemNodeToItem)
We should really remove those parenthesis: Seq.map is an F# function, and we usually distinguish between calling an F# function and a .NET method by the parenthesis, they're unnecessary here: itemNodes |> Seq.map itemNodeToItem, and I assume you probably have them because you were using a fun ... before, which requires parenthesis, but once you've extracted that to it's own function the parenthesis are obsolete.
In the end, this is very good F# code. You did a wonderful job concisely and clearly expressing what you wish to achieve: the steps are logical, flow, and make sense. Very good job. :) | {
"domain": "codereview.stackexchange",
"id": 26939,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "f#, rss",
"url": null
} |
2. Consider $$n = ab - a - b$$. Write $$ab - a - b = ra + sb$$ and rearrange this to yield $$(s+1)b = (b-r-1)a$$. Since $$a, b$$ are relatively prime, this is satisfied only when $$a \divides s + 1$$ and $$b \divides b - r - 1$$. If $$s$$ is nonnegative, then $$s \geq a - 1$$, and substituting this into $$ab - a - b = ra + sb$$ yields $$r \leq -1$$. So there is no nonnegative solution for $$ab - a - b$$. By (a), this is also the greatest $$n$$ for which there is no nonnegative solution. | {
"domain": "brianbi.ca",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936059556499,
"lm_q1q2_score": 0.8157533851563289,
"lm_q2_score": 0.8289388125473629,
"openwebmath_perplexity": 73.26678730461299,
"openwebmath_score": 0.9586514234542847,
"tags": null,
"url": "https://brianbi.ca/artin/2.M"
} |
modulation, python, ofdm
Frequency domain
You could simply apply an additional zero padding in frequency domain by using a 2048 IFFT and by setting every second subcarrier to zero. You then shift all subcarriers by one frequency bin to achieve the frequency shift. This will maintain the frequency spacing of 15 kHz but the bandwidth of each subcarrier will be divided by two compared to the 1024 IFFT.
Time domain
You apply two-times oversampling to the time domain signal at the output of the IFFT. This can be done by padding a zero sample after each sample followed by a lowpass filter or some other interpolation method. The frequency shift can then be achieved by multiplying the resulting signal by $\exp(j\Omega_1 n)$, where $\Omega_1$ is the 7.5 kHz normalized to the new sampling frequency (double the original sampling frequency) and $n$ is the discrete time. | {
"domain": "dsp.stackexchange",
"id": 7678,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "modulation, python, ofdm",
"url": null
} |
newtonian-mechanics, special-relativity, spacetime, inertial-frames
Title: Drawing spacetime diagrams assuming absolute time (page-6,Section 1.5, Schutz)
Suppose an observer $O$ uses the coordinates $t,x$ as above, and that another observer $\tilde{O}$ with coordinates $\tilde{t}, \tilde{x}$ is moving with velocity $v$ in the $x$ direction relative to $O$. Where do the coordinate axes for $\tilde{t}$ and $\tilde{x}$ go in the spacetime diagram of $O$?
$\tilde{t}$ axis: This is the locus of events at constant $\tilde{x}=0$ , which is the locus of the origins of $\tilde{O}$'s spatial coordinates. This is $\tilde{O}$'s world as shown in fig $1.2$
Note: Slightly paraphrased. | {
"domain": "physics.stackexchange",
"id": 88127,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, special-relativity, spacetime, inertial-frames",
"url": null
} |
ros, gazebo
Title: Why is my robotic arm laying down in Gazebo after configure it with MoveIt Setup Assistant?
I am very new to ROS and all the tools surrounding ROS. Currently, I am trying to setup a franka emika (panda) robot arm using moveit setup assistant. After that, I just wanna launch the robot in the Gazebo simulation using the command
roslaunch package_name gazebo.launch
However, as you can see below, the robot collapse when spawned.
Here are some of the messages capture in the terminal (shown in the picture below):
I have gone through past questions on similar problems online, but it seems like the files generated from the setup assistant is a little different, hence I wasn't able to locate what are the mistakes.
Below also I will attach the code for the robot urdf:
panda_arm.urdf.xacro:
<?xml version='1.0' encoding='utf-8'?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="panda"> | {
"domain": "robotics.stackexchange",
"id": 37391,
"lm_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",
"url": null
} |
c, queue
#endif
priority_queue.c
#include "priority_queue.h"
#define PQ_PRIORITY_LEVELS 5
#define PQ_LINES 4
#define PQ_LINE_CAPACITY 50
//It just keeps separate queues based on priority.
struct Priority_Queue {
Queue **index; //Queue array
size_t element_count;
uint8_t priority_levels;
};
//Internal methods
static void deallocate_all_queues(Priority_Queue *pq)
{
for(uint8_t i = 0; i < pq->priority_levels; ++i)
qu_free(pq->index[i]);
}
//Public methods
//Allocate all data structures according to given values
Priority_Queue *pq_allocate_custom( uint8_t priority_levels,
size_t lines_per_priority_level,
size_t line_capacity )
{
if(priority_levels < 2
|| lines_per_priority_level < 2
|| line_capacity < 1)
return NULL; | {
"domain": "codereview.stackexchange",
"id": 5840,
"lm_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, queue",
"url": null
} |
python, parsing
i += 1
self.date = fields[i]
i += 1
self.time = long(fields[i])
i += 1
self.ipAddress = IP(fields[i])
i += 1
self.url = fields[i]
i += 1
self.userAgentString = fields[i]
i += 1
self.properties = ast.literal_eval(fields[i])
i += 1
self.customerId = fields[i]
def select(self, *fields):
d = { key: getattr(self, key) for key in fields }
Tuple = namedtuple('Tuple', fields)
return Tuple(**d)
l = LogRecord("8.53\t2014-12-13\t1420007099253\t127.0.0.1\thttp://www.google.com/abc/123\tMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36\t{'x': 11, 'y': 22}\tx97ag89x77d")
print l.select('version', 'url', 'customerId') | {
"domain": "codereview.stackexchange",
"id": 11416,
"lm_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, parsing",
"url": null
} |
ros, hardware-interface
Title: Wheel Calibration
I have my first robot prototype build from scratch up and running using ROS + Arduino. :)
But when i control the robot straight forward, it goes a bit sideway.
I'm using a L298N Dual H-Bridge to power the motors, which has more power input as the motors require, cause the shield seem to measure whats the max power to put on the motors.
I noticed, one side of the motor shield gives more power as the other side. (10v input, left wheel 7V output, right wheel 7.7V output, motors specs 6V)
I also have an MPU6050 connected, but not fully implemented yet in the hardware interface (not publishing the IMU data yet)
Will the IMU data update the joint commands received by the hardware interface if it notice the robot don't go straight or should i try to fix this in the firmware code?
Originally posted by RandyD on ROS Answers with karma: 161 on 2017-07-02
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 28270,
"lm_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, hardware-interface",
"url": null
} |
This gives way to Binary Search if we sort the given sides, we can use binary search to find the side. Additional check is required to make sure that we do not select the same side twice (in case we had chosen the side we found already as x or y.) or checking if this combination of sides (x, y, z) satisfies Triangle Inequality Theorem which states that sum of any two sides should be greater than third side. You may read about triangle inequality here if you want to.
Now, suppose we have multiple answer, so, how to find which triangle results in larger value of θ. For this, we need to understand the behaviour of \cos θ as θ increases, in range [0, 180). We can find, that the cos function is strictly decreasing function in this range, hence, we can just see, that to maximize θ, we need to minimize \cos θ.
Every time we hit a valid triangle, we can just apply Law of Cosine again to find the value of \cos θ, and choose the one with minimum value of θ. | {
"domain": "codechef.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.984810949854636,
"lm_q1q2_score": 0.8005206398499053,
"lm_q2_score": 0.8128673223709251,
"openwebmath_perplexity": 1663.667261544326,
"openwebmath_score": 0.7884764671325684,
"tags": null,
"url": "https://discuss.codechef.com/t/angle-editorial/20846"
} |
c#, .net, security, sql-server, authentication
A new tab will open with a lot of fun stuff, order everything by 'Object Type' and find SqlConnection.
Double click your SqlConnection line.
Click the first line (assuming you have one) in the new portion of the window, then click 'Referenced Objects' at the bottom section of the window.
It should show you a bunch of objects, find SqlConnectionString, and drill down into it.
You should see several string objects. Go ahead and hover each one, one will be your password.
Of course, the string object on the SqlConnection itself will also be a connection string and have your password in it. | {
"domain": "codereview.stackexchange",
"id": 23719,
"lm_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, security, sql-server, authentication",
"url": null
} |
javascript, beginner, ruby-on-rails, react.js
I notice you use React, so probably you're using Babel (if not, you should). This gives you access to a lot of shortcuts seen above. First, in ES6, arrays now have a find method so you can drop using lodash/underscore for that. Then there's the arrow functions to make callbacks a bit shorter. Not related to ES6 syntax, you should also use strict comparison, unless the comparison calls for loose comparison.
Now with regards to the yardages table, I'm not sure you want to actually show a blank table when yardage is not defined. You might want to actually just show an error message instead of a blank table.
And I notice you use BEM convention for CSS. Good. At least you are not using inline styles, because it has a very high specificity and makes it hard for stylesheets to override. | {
"domain": "codereview.stackexchange",
"id": 16430,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, beginner, ruby-on-rails, react.js",
"url": null
} |
search-algorithms, artificial-intelligence
However, the Unidirectional search algorithm would have gone all the way through $\pi$, as it is its only choice, finding the goal node in precisely $\ell$ expansions.
To prevent this, Ira Pohl's principle of cardinality is applied often. It dictates to expand nodes from the OPEN list with less nodes. In this case, it would suggest expanding only nodes from the forward search, making Bidirectional Dijkstra to behave like Unidirectional Dijkstra. However, it should not be very difficult to make some maths to find a little bit more involved case where Ira Pohl's principle of cardinality does not help and Bidirectional Dijkstra still expands more nodes than Unidirectional Dijkstra.
In general, we say that Bidirectional Dijkstra expands only $O(b^{d/2})$ nodes whereas Unidirectional Dijkstra has to expand $O(b^d)$ nodes, but this assumes that the branching factor is the same for the forward and backward search. | {
"domain": "cs.stackexchange",
"id": 6666,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "search-algorithms, artificial-intelligence",
"url": null
} |
python, web-scraping
Although not really necessary since logging already caches the loggers it creates, I find it removes a bit of clutter from the code and ease overall readability.
Requests
A few quick comments about your usage of requests:
Using the json parameter of a request automatically adds the Content-Type: application/json header, you don't need to add it yourself
Using a requests.Session to perform your requests allows to reuse connections and reduce network-related overheads
As I started using a Session in the ThreadPoolExecutor, I got some warnings from urllib3 that the default connection pool was getting full and some requests were dropped: consider using an adapter that suits your needs.
While on the topic of adapters, consider using an urllib3.Retry object instead of rolling your own retry mechanism. Interesting parameters for you seems to be total, status_forcelist and backoff_factor. Or even, consider rolling your own subclass to always get a retry delay of 2 seconds. | {
"domain": "codereview.stackexchange",
"id": 45003,
"lm_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, web-scraping",
"url": null
} |
special-relativity, kinematics, inertial-frames, collision
To find $E_{A,COM}=\hat P \cdot \tilde p_A$,
note that
$\tilde P=\tilde p_A+\tilde p_B$
implies (since we care least about B)
$$\tilde p_B=\tilde P-\tilde p_A$$
and
thus (essentially the Minkowski analogue of the Law of Cosines)
\begin{align}
\tilde p_B \cdot \tilde p_B
&=\tilde P\cdot\tilde P
+\tilde p_A\cdot\tilde p_A
-2\tilde P\cdot \tilde p_A\\
m_B^2
&=s+m_A^2-2(\sqrt{\tilde P\cdot \tilde P}\hat P)\cdot \tilde p_A\\
&=s+m_A^2-2\sqrt{s}(\hat P\cdot \tilde p_A)\\
m_B^2&=s+m_A^2-2\sqrt{s}(E_{A,COM})\\
\end{align}
and you're done. | {
"domain": "physics.stackexchange",
"id": 56855,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, kinematics, inertial-frames, collision",
"url": null
} |
quantum-field-theory, fermions, commutator, spin-statistics, anticommutator
But notice that the frequency in the expansion of $\psi$ changes sign at $k=0$. This came from the linearity of the Dirac Hamiltonian in the momenta. It means that the operator $a_k$ acts to raise the energy for k>0, but acts to lower the energy for $k<0$. This means that the $k>0$ operators create, and the $k<0$ operators annihilate, so that the right way to $a^{\dagger}(-k)$ are creation operators, while the $k<0$ operators are annihilation operators.
The energy operator counts the number of particles of momentum k, and multiplies by their energy:
$$ H = \int_{k>0} k a^{\dagger}(k) a(k) dk $$
And this is manifestly not a local operator, it is defined only integrated over k>0. To make it a local operator, you need to extend the integration to all k, but then the negative k and positive k contributions have opposite sign, and they need to be equal. To arrange this, you must take anticommutation relations
$$ \{ a^{\dagger}(k),a(k)\} = i\delta(k-k') $$
And then | {
"domain": "physics.stackexchange",
"id": 2005,
"lm_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, fermions, commutator, spin-statistics, anticommutator",
"url": null
} |
electrical-engineering, power-electronics, consumer-electronics
This one switches low side (which is safe in your 24v application), but it is nice because it triggers right off of the 3 volt rpi gpio without a driver.RFD3055LE 60V 11A N-Channel Mosfet
Here is a really nice mosfet wiring tutorial. bildr.org mosfet tutorial | {
"domain": "engineering.stackexchange",
"id": 498,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrical-engineering, power-electronics, consumer-electronics",
"url": null
} |
atmosphere, clouds
If the terrain was a long ridge instead of an isolated peak, the lenticular cloud will elongated as a line over the ridge tops.
You generally won't see the cloud elongated downwind, as the air is forced down the lee slope. What you might instead see are clouds at regular intervals downstream of the mountain if the mountain (and atmospheric stability) has caused a standing wave to form. In this case you might see clouds in the peaks of the wave depending the humidity of the air and the amplitude of the wave. | {
"domain": "earthscience.stackexchange",
"id": 852,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "atmosphere, clouds",
"url": null
} |
complexity-theory, graphs
I only need an answer to inapproximability to constant factor and I believe there is a one step proof for this.
If we had such a product, then we have $\alpha(G\cdot G\cdot\cdots \cdot G\cdot G)=\alpha(G)^k$. If $\alpha(G\cdot G\cdot\cdots \cdot G\cdot G)$ can be approximated to constant factor $\sigma>0$, then $\alpha(G\cdot G\cdot\cdots \cdot G\cdot G)=\sigma\hat\alpha(G\cdot G\cdot\cdots \cdot G\cdot G)=\alpha(G)^k$ and since $0<\sqrt[k]{\sigma}<\sigma$, we can get an approximation of $\alpha(G)$ that is better than $\sigma$ by $\sqrt[k]{\sigma\hat\alpha(G\cdot G\cdot\cdots \cdot G\cdot G)}=\alpha(G)$. Consider $G = K_2$, for which $\alpha(G)=1$. The only product defined in terms of subgraphs of $K_4$ and for which $\alpha(G \times G) = 1$, is the strong product (⊠). This doesn't quite work, since $\alpha(C_5 ⊠ C_5) = 5$, which is not a perfect square. | {
"domain": "cs.stackexchange",
"id": 1833,
"lm_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, graphs",
"url": null
} |
machine-learning, quantum-enhanced-machine-learning, pennylane
Title: How to save a hybrid Tensorflow and Pennylane model? I implemented a hybrid model with Keras and Pennylane that looks like this: | {
"domain": "quantumcomputing.stackexchange",
"id": 5291,
"lm_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, quantum-enhanced-machine-learning, pennylane",
"url": null
} |
c#
Title: Best way to check for specific types Normally I do this:
if (Animal is Dog)
{
Doc d = (Dog)Animal;
// d. etc..
}
else if (Animal is Cat)
{
Cat c = (Cat)Animal;
// c. ....
}
Is this a good way or are there better ways to implement this code above (performance, ...) ?
Should it be like this?:
Dog d = Animal as Dog;
if (d != null;)
{
// d. etc..
}
else if (Animal is Cat)
{
Cat c = (Cat)Animal;
// c. ....
}
Or maybe like this?:
Dog d = Animal as Dog;
Cat c;
if (d != null;)
{
// d. etc..
}
else if ((c = Animal as Cat) != null)
{
// c. ....
} | {
"domain": "codereview.stackexchange",
"id": 3965,
"lm_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
} |
## Smooth Formulations of Nonsmooth Functions
To smooth an otherwise nonsmooth problem, you can sometimes add auxiliary variables. For example,
f(x) = max(g(x),h(x))
can be a nonsmooth function even when g(x) and h(x) are smooth, as illustrated by the following functions.
$\begin{array}{l}g\left(x\right)=\mathrm{sin}\left(x\right)\\ h\left(x\right)=\mathrm{cos}\left(x\right)\\ f\left(x\right)=\mathrm{max}\left(g\left(x\right),h\left(x\right)\right).\end{array}$
f(x) is nonsmooth at the points x = π/4 and x = 5π/4.
This lack of smoothness can cause problems for Optimization Toolbox™ solvers, all of which assume that objective functions and nonlinear constraint functions are continuously differentiable. So, if you try to solve
x = mint(f(t)) starting from the point x0 = 1,
you do not get an exit flag of 1, because the solution is not differentiable at the locally minimizing point x = π/4. | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.988130881050834,
"lm_q1q2_score": 0.8168994597783523,
"lm_q2_score": 0.8267118004748677,
"openwebmath_perplexity": 2788.434556330208,
"openwebmath_score": 0.7183660268783569,
"tags": null,
"url": "https://au.mathworks.com/help/optim/ug/smooth-formulation-using-auxiliary-variables.html"
} |
c++, object-oriented, game, physics, sfml
void Bird::draw(sf::RenderTarget &target) {
target.draw(body);
}
I used the fact that sf::Window derives from sf::RenderTarget, so Bird::draw() is now more generic than if you would pass a reference to an sf::Window. Alternatively, with SFML, you could make Bird become an sf::Drawable, like so:
void Game::draw_objects() {
...
window.draw(bird);
...
}
class Bird: public sf::Drawable {
...
Bird::draw(sf::RenderTarget &target, sf::RenderStates states) final;
...
};
void Bird::draw(sf::RenderTarget &target, sf::RenderStates states) {
target.draw(body);
} | {
"domain": "codereview.stackexchange",
"id": 39655,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, object-oriented, game, physics, sfml",
"url": null
} |
• @Isaac, you're right that that does make more sense. I'll change my question (though I'm not sure it was particularly unclear originally). – Sophie Alpert Feb 13 '11 at 19:58
• @Arturo: Yes, but why is the derivative of $\cos(x)$ equal to $-\sin(x)$ when $x$ is measured in radians? – Sophie Alpert Feb 13 '11 at 19:59
• @Ben: Because $$\lim_{x\to 0}\frac{\sin x}{x} = 1$$when $x$ is measured in radians. Basically, because radians give the arclength parametrization of the unit circle (one radian yields one unit of arc length), and degrees do not. Radians are the "normalized" way of measuring angles, so that pesky proportionality constants all become $1$ when you use radians. – Arturo Magidin Feb 13 '11 at 20:02 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9783846672373523,
"lm_q1q2_score": 0.8335375586556955,
"lm_q2_score": 0.8519528019683106,
"openwebmath_perplexity": 158.1203335442763,
"openwebmath_score": 0.9234367609024048,
"tags": null,
"url": "https://math.stackexchange.com/questions/21796/finding-int-0-pi-2-sin-x-dx"
} |
java, datetime, spring
Title: TimeZone computing method I feel like there is a code smell in this. Can someone help me to refactor/optimize it?
protected TimeZone resolveTimeZone() {
IUserPreferences preferences = userProfileService.getCurrentUserPreferences();
if (preferences != null) {
String timeZone = preferences.getPreferredTimeZone();
if (timeZone != null && !"".equals(timeZone))
return TimeZone.getTimeZone(timeZone);
else return defaultTimeZone();
}
else return defaultTimeZone();
}
public TimeZone defaultTimeZone() {
Locale defaultLocale = new Locale(appConfiguration.getDefaultLocale());
Calendar calendar = Calendar.getInstance(defaultLocale);
return calendar.getTimeZone();
} Some immediate improvement ideas are possible at first glance: | {
"domain": "codereview.stackexchange",
"id": 10477,
"lm_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, datetime, spring",
"url": null
} |
clojure, computational-geometry
(defn transform-matrix [m]
(-> m
transpose
filter-matrix
transpose))
Let's try it out:
=> (transform-matrix [[0 2 0] [1 3 5] [3 3 0]])
[[0 0 0] [0 1 5] [0 3 0]]
If you want to do more advanced operations on matrices I recommend looking into the core.matrix library.
Hope this helps! | {
"domain": "codereview.stackexchange",
"id": 13580,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clojure, computational-geometry",
"url": null
} |
binary-trees, balanced-search-trees
Title: rebalance red-black tree with many violations Every red-black tree implementation I've come across use a strategy that considers re-balancing the tree after each mutation (e.g. insert, delete, ...).
I have a situation where I graft several sub-trees from one red-black tree onto another. After these grafts I would like to consider re-balancing the resulting tree.
Are there any approaches to doing this, either applying existing techniques in a brute force manner, or strategies that would make it efficient. It isn't entirely clear that existing algorithms can be naively applied. In general, I would say that the algorithm you want is a tree union (also called a merge), which takes two trees and combines them so that the new tree contains the union of the keys of both inputs. You can read a brief description on Wikipedia, or a more in-depth description (which generalizes to other balancing schemes such as AVL, BB[α], Treap) in a recent paper. | {
"domain": "cs.stackexchange",
"id": 10381,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "binary-trees, balanced-search-trees",
"url": null
} |
waves
One final note: I have neatly skipped over the reasoning as to why a higher average eigenspectrum frequency of a branch will mean than a displacement at one end of a chain will propagate to the other end at a higher speed when the disturbance is longitudinal. But with a little generalization of the thinking involved in Fourier analysis, you can represent the disturbance in the vector representation, and a little thinking will convince you of why the propagation speed will be faster in the longitudinal case. | {
"domain": "physics.stackexchange",
"id": 49933,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves",
"url": null
} |
quantum-mechanics, heisenberg-uncertainty-principle, measurement-problem
Now we live in a highly noncommutative world, so that on the one hand the uncertainty principle results directly from something as everyday and familiar as the notion that the shoe and sock on-putting operators do not commute when you get dressed in the morning. But on the other hand, whilst you can unscramble a warddrobe malfunction by undoing the respective operators and imparting them in the right order, observables do not map the quantum state - they only tell us how to calculate the measurement probability distribution, so they cannot in any sense be "inverted" and moreover, since the measurement by $\hat{x}$ co-indides with the system choosing a random eigenstate of the observable, information about what the measurement $\hat{p}$ would have been were it made instead is destroyed. Indeed, the experimental violation of the Bell inequalities suggests that the notion of "would have been" is meaningless. | {
"domain": "physics.stackexchange",
"id": 24562,
"lm_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, heisenberg-uncertainty-principle, measurement-problem",
"url": null
} |
python
But this would get quite complicated, moreover, it wouldn't make a lot of sense to inherit Book from Library. Hence it is a good idea to keep Library as a separate that will merely control the books.
class Library():
def __init__(self,book_list = []):
self.book_list = book_list
def new_book(self,book):
self.book_list.append(book)
def remove_book(self,name): # book is the name of the book
for book in self.book_list:
if book.name == name:
self.book_list.remove(book)
break
def print_books(self):
for book in self.book_list:
print(f"Book {book.name} by {book.author}")
class Book():
def __init__(self,author,name):
self.author = author
self.name = name
def print_book(self):
print(f"{self.name} by {self.author}")
class Novel(Book):
def __init__(self,author,name):
Book.__init__(self,author,name) | {
"domain": "codereview.stackexchange",
"id": 39552,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python",
"url": null
} |
javascript, beginner, object-oriented, tic-tac-toe, mvc
// GAME FLOW FUNCTION EXECUTED EACH TIME A PLAYER MAKES A MOVE
function turn() {
console.log(`Now playing: ${state.activePlayer}`)
let cell = this; // currently clicked cell
if (!cell.hasAttribute('data-disabled')) {
game.storeMove(cell, state.boardArray, state.activePlayer);
state.moves += 1
ui.paintCell(cell, state.activePlayer);
if (checker.checkWinner(state.boardArray, state.boardDim, state.activePlayer)) {
ui.paintWinner(view.resultScreen, state.activePlayer)
}
else if (checker.checkDraw(state.moves)) {
ui.paintDraw(view.resultScreen);
}
else {
state.activePlayer = game.changeTurn(state.activePlayer, P1_CLASS, P2_CLASS);
ui.changeTurnHover(view.cells, state.activePlayer, P1_CLASS, P2_CLASS);
}
}
};
};
UIFunctions.js
// FUNCTIONS | {
"domain": "codereview.stackexchange",
"id": 43220,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, beginner, object-oriented, tic-tac-toe, mvc",
"url": null
} |
ros-control, ros-indigo
Originally posted by gvdhoorn with karma: 86574 on 2018-01-28
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 29866,
"lm_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-control, ros-indigo",
"url": null
} |
electromagnetism, waves, computational-physics
what $ξ, η$, and $ζ$ are. Furthermore
how I can write them down in a computer-friendly way.
why there is a formulation of the $L_2$ norm between these letters
Do you know how one can write this solution in code? The solution seems to be using Green functions. Answering your particular questions:
These are spatial variables used for the integration. You are basically using superposition of point loads (convolution with Green functions) and these are the coordinates of each point load. Notice that these are dummy variables because they disappear after integration.
I think that they are already in a "computer friendly way". You could rewrite them as the sum of disjoint integrals where you have a sum over patches (or elements) that correspond to a discretization of space.
I guess that you are referring to $r$. This is the distance between the location of the point source and your evaluation point. | {
"domain": "physics.stackexchange",
"id": 80731,
"lm_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, waves, computational-physics",
"url": null
} |
___________________________________
A space $Y$ is first countable if there exists a countable local base at each point $y \in Y$. A space $Y$ is a Frechet space (or is Frechet-Urysohn) if for each $y \in Y$, if $y \in \overline{A}$ where $A \subset Y$, then there exists a sequence $\left\{y_n: n=1,2,3,\cdots \right\}$ of points of $A$ such that the sequence converges to $y$. Clearly, any first countable space is a Frechet space. The converse is not true (see Example 1 in this previous post).
For any uncountable cardinal number $\tau$, the product $\mathbb{R}^\tau$ is not first countable. In fact, any dense subspace of $\mathbb{R}^\tau$ is not first countable. In particular, the $\Sigma$-product $\Sigma_{\alpha<\tau}\mathbb{R}$ is not first countable. In this previous post, it is shown that the $\Sigma$-product of first countable spaces is a Frechet space. Thus $C_p(L_\tau) \cong \Sigma_{\alpha<\tau}\mathbb{R}$ is a Frechet space.
___________________________________ | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429107723176,
"lm_q1q2_score": 0.8372580846858609,
"lm_q2_score": 0.8499711794579723,
"openwebmath_perplexity": 128.38624810648136,
"openwebmath_score": 0.9707801342010498,
"tags": null,
"url": "https://dantopology.wordpress.com/category/lindelof-space/"
} |
tensorflow, cnn, convolutional-neural-network
# The fifth convolution
tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
# Flatten the results to feed into a DNN
tf.keras.layers.Flatten(),
# 512 neuron hidden layer
tf.keras.layers.Dense(512, activation='relu'),
# Only 1 output neuron. It will contain a value from 0-1 where 0 for 1 class ('horses') and 1 for the other ('humans')
tf.keras.layers.Dense(1, activation='sigmoid')
]) | {
"domain": "datascience.stackexchange",
"id": 10002,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tensorflow, cnn, convolutional-neural-network",
"url": null
} |
• You need to change $j$ to $i$ in the sums. – mathlove Jan 20 '18 at 16:28
• This is related to math.stackexchange.com/q/442459/147357 (which asked for a proof of the fact and didn't provide it's own attempt). – Teepeemm Jan 20 '18 at 22:06
• There are several Q&A's about this identity, but this one specifically asks "Is the following Proof Correct?" – Martin R Jan 20 '18 at 22:13
Your proof looks correct apart from some typos: $\forall n<k$ should be $\forall k < n$, and (as @mathlove noticed) there is a mix-up between $i$ and $j$ in the indices.
But it can be simplified. In particular you don't need strong induction since only the inductive hypothesis for $n-1$ is used to prove the statement for $n$, so “simple induction” is sufficient.
Also $F_{n+1} = F_{n}+F_{n-1}$ holds for $n\ge 1$ and not only for $n \ge 2$, therefore it is sufficient to consider a single base case ($n = 0$). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105314577313,
"lm_q1q2_score": 0.8114537189389563,
"lm_q2_score": 0.8311430562234877,
"openwebmath_perplexity": 311.4090539091353,
"openwebmath_score": 0.9112712740898132,
"tags": null,
"url": "https://math.stackexchange.com/questions/2613609/summation-of-squares-of-fibonacci-numbers"
} |
pressure, everyday-life, air, popular-science
Title: If my windows are open on a windy day, the curtains sway and the doors slam shut. Why don't I feel this wind? I am standing indoors, right in front of my open window, as I see my curtains moving back and forth and I can hear my closed doors shaking. I can also hear the wind howling loudly.
Why don't I feel this wind/air moving back and forth? I can see and hear it, as described above, but my body doesn't feel any of this flowing wind. Maybe this has something to do with the window screen?
If I am outdoors, of course, I immediately feel the wind.
Please explain this as if you are talking to someone who knows nothing about physics (which is the case for me).
Related question on Physics SE:
"Why does my door shut faster when the window is open?" Assuming the doors are shut and you are not very close to the window, then: | {
"domain": "physics.stackexchange",
"id": 28856,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pressure, everyday-life, air, popular-science",
"url": null
} |
ros, roscreate-pkg, rosmake
[ rosmake ] All 32 linesearning_actionlib: 9.7 sec ] [ 1 Active 6/7 Complete ]
{-------------------------------------------------------------------------------
mkdir -p bin
cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake ..
-- Action Files:Fibonacci.action
-- Generating Messages for ActionFibonacci.action
-- Using CATKIN_DEVEL_PREFIX: /home/xhab/ros/learning_actionlib/build/devel
-- Using CMAKE_PREFIX_PATH: /home/xhab/ros/clam_catkin/devel;/opt/ros/groovy
-- This workspace overlays: /home/xhab/ros/clam_catkin/devel;/opt/ros/groovy
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.63
-- /home/xhab/ros/learning_actionlib/msg/FibonacciAction.msg
[rosbuild] Building package learning_actionlib
[rosbuild] Cached build flags older than manifests; calling rospack to get flags
Failed to invoke /opt/ros/groovy/bin/rospack cflags-only-I;--deps-only learning_actionlib | {
"domain": "robotics.stackexchange",
"id": 13439,
"lm_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, roscreate-pkg, rosmake",
"url": null
} |
organic-chemistry, synthesis
This synthesis involves a Mannich reaction as you asked, but it can be done much simpler without it I think.
Note: I'm not an expert, just an enthusiastic amateur. Before trying anything in the lab make sure your synthesis is checked by a supervisor. | {
"domain": "chemistry.stackexchange",
"id": 2750,
"lm_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, synthesis",
"url": null
} |
image, html5, svg, base64
<metadata id="metadata5">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-0.41000891,-0.47546211)">
<image id="image3721" width="208.51721" height="1.5955585" x="0.41000891" y="0.47546211"
xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/7QA2UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAABkcAmcAFHZX
ei1vODJ5WVJ0QjJZVmlhNHBkAP/bAEMAAwMDAwMDBAQEBAUFBQUFBwcGBgcHCwgJCAkICxELDAsL | {
"domain": "codereview.stackexchange",
"id": 40139,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image, html5, svg, base64",
"url": null
} |
c++, c, shell, arduino
void controlLED(int32_t onOff) {
digitalWrite(LED_BUILTIN, onOff);
}
/**
* Setup
*/
void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
// Define commands. Could be done in separate libraries (e.g. MQTT, LoRa, Webserver, ...)
command_invoker::defineIntCommand("led", controlLED, F(" 1/0 (LED on/off)"));
command_invoker::defineIntCommand("double", multiplyBy2, F(" 123 (Doubles the input value)"));
// Commands can also be created with lambdas.
command_invoker::defineCommand("reset", []() {
ESP.restart();
}, F(" (restarts the microcontroller)"));
// Simple example. Turn LED on at startup.
command_invoker::execute("led 1");
Serial.println(F("Console is ready!"));
Serial.print(F("> "));
} | {
"domain": "codereview.stackexchange",
"id": 41201,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c, shell, arduino",
"url": null
} |
newtonian-mechanics, forces, reference-frames, acceleration, vectors
Title: Where does pseudo force act at? It is known that, to apply Newton's laws in a non-inertial frame, we use the concept of pseudo force. We also know that force is a bound vector. Hence, is there a general way to determine where the pseudo force vector would be located at? Like gravity, pseudoforces apply at all points in a body. In mechanics, when we say that a distributed force "acts" at a single point, we mean that performing such a replacement does not change the torque acting on the body as a whole. Whether this is possible depends on the pseudoforce. | {
"domain": "physics.stackexchange",
"id": 90566,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, forces, reference-frames, acceleration, vectors",
"url": null
} |
ros, ros-melodic, catkin-make, ros-control
"I have been using the package with the ROS Melodic. To compile the
package on the ROS Melodic, the following line in some header files in
the "custom_controller" package has to be change from
std::vector<boost::shared_ptr<const urdf::Joint> > joint_urdf_; | {
"domain": "robotics.stackexchange",
"id": 34535,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-melodic, catkin-make, ros-control",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.