text stringlengths 1 1.11k | source dict |
|---|---|
error-correction, stim, pymatching
Of course, simply ignoring the correlations is not required. Decoders that perform correlated decoding will take note of these correlations between edges instead of simply splitting them into independent pieces. There's a huge variety of ways this can be done. For example, after a simple pre-matching pass that can only match adjacent detection events, the decoder can use the pre-matched edges as triggers for downweighting associated edges. | {
"domain": "quantumcomputing.stackexchange",
"id": 4536,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "error-correction, stim, pymatching",
"url": null
} |
Because of $$x,y,z \in \{0,\ldots,9\}$$ and $$9z-x^2\ne0$$ we have $$|2z-y|\le18$$ and $$|9z-x^2|\ge1.$$ So $$|t|\le18$$, and therefore $$t=11$$.
If we substitute this in $$(1)$$ we get
$$11x^2+2y=101z$$
Taking this equation $$\pmod {11}$$ we get
$$y\equiv 2z \pmod{11}$$
and we can calulate $$y$$ for every digit $$z$$. For $$z=5$$ there is no valid $$y$$, because $$y=10$$ is not a digit. From $$z$$ and $$y$$ we can calculate $$x$$. For $$z=2$$ and $$y=4$$ there is no valid $$x$$ because the calculated value is a non integer square root.
z y x
0 0 0
1 2 3
2 4 *
3 6 *
4 8 6
5 * *
6 1 *
7 3 8
8 5 *
9 7 *
Case 2: $$9z-x^2=0$$
Then we also have
$$2z-y=0$$
The number $$9z$$ must be a perfect square and therefore $$z$$ must be a perfect square. So we can calculate
z x y
0 0 0
1 3 2
4 6 8
9 9 *
Because $$9z-x^2=2z-y=0$$ the equation holds for arbitrary $$t.$$
So we can conclude that
$$88^2+33=7777$$
and for every $$n\ge2$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9736446433301305,
"lm_q1q2_score": 0.81136202032022,
"lm_q2_score": 0.8333245870332531,
"openwebmath_perplexity": 172.40335510205227,
"openwebmath_score": 0.9748275279998779,
"tags": null,
"url": "https://math.stackexchange.com/questions/3312967/the-natural-numbers-a-b-c-formed-by-the-same-n-digits-x-n-digits-y"
} |
black-holes, energy-conservation, mass-energy, gravitational-waves, ligo
Was the orbit circular or elliptical?
Were they spinning?
Were the spins of the black holes aligned with the orbital plane? | {
"domain": "physics.stackexchange",
"id": 28598,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-holes, energy-conservation, mass-energy, gravitational-waves, ligo",
"url": null
} |
# Problem with proving equation. (Sets.)
I would like to ask you for helping me out with this problem. I had to prove this equation.
$$\left(\bigcap_i A_i\cap\bigcup_{i\text{ odd}}A_i\right)\triangle\bigcap_{i\text{ odd}}A_i=\left(\bigcap_i A_i\triangle\bigcap_{i\text{ odd}}A_i\right)\cap\bigcup_i A_i$$
I did following:
\begin{align*} \left(\bigcap_i A_i\cap\bigcup_{i\text{ odd}}A_i\right)&=\bigcap_i A_i\\ \left(X\cap\bigcup_i A_i\right)&=X \end{align*}
$X\subseteq\bigcup A_i$
And after this I modified the main equation. But I didn't prove that, that 2 equations are true in common. Is it a valid? Or I have to prove that? If yes, how to prove that?
Sorry for my english. Thanks | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639644850629,
"lm_q1q2_score": 0.8158552607960277,
"lm_q2_score": 0.8397339656668286,
"openwebmath_perplexity": 104.18897219097474,
"openwebmath_score": 1.0000100135803223,
"tags": null,
"url": "http://math.stackexchange.com/questions/242227/problem-with-proving-equation-sets"
} |
java, performance, reflection, constants
static
{
final Map<Integer, String> int2string = new HashMap<>();
try
{
for (Field field: Arm_const.class.getFields())
{
final int mod = field.getModifiers();
if (!int.class.equals(field.getType()))
continue;
if (!Modifier.isStatic(mod) || !Modifier.isPublic(mod))
continue;
if (!field.getName().startsWith("ARM_CC_"))
continue;
int2string.put(field.getInt(null),
field.getName().substring("ARM_CC_".length()));
}
}
catch (IllegalAccessException l_e)
{
throw new RuntimeException(l_e); // should not occur
}
_int2string = Collections.unmodifiableMap(int2string);
}
public static String getCCName(int cc)
{
return _int2string.get(cc);
} | {
"domain": "codereview.stackexchange",
"id": 32115,
"lm_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, performance, reflection, constants",
"url": null
} |
java, swing
and initialise them whilst looping through the colours
for (EColorSet currentColor : EColorSet.values()) {
colourbuttons[currentColor.ordinal()] = new JButton();
colourbuttons[currentColor.ordinal()].setBackground(currentColor.c);
//do the same for the colors menu items -note you use the label...
}
see the fact in colourbuttons[currentColor.ordinal()] .setBackground(currentColor.c); i'm using the colour stored in my enum
We need to map the button (or menu item click) to an index in the array, which also represents a EColorSet instance. Unfortunately, we still need the index of the button in the array, but
public void actionPerformed(ActionEvent e) {
JButton temp = (JButton)e.getSource();
int index = 0;
for(JButton b : colourbuttons) {
if(temp.equals(b)) {
break;
}
index ++;
}
EColorSet currentColor = EColorSet.values()[index];
setColor(currentColor);
setMenuFromColor(currentColor);
} | {
"domain": "codereview.stackexchange",
"id": 13555,
"lm_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, swing",
"url": null
} |
multiplied by the differential element of area. We work hard to ensure that the results presented by TranslatorsCafe. The ClearCalcs cross-section calculator allows the user to input the geometry of an arbitrary cross-section using either simple dimensions of common shapes, or fully-custom outline. recommends formulas for Ec and Ie. moment of inertia converter. Moment of Inertia for body about an axis Say O-O is defined as ∑dM*y n 2. Online arctangent calculation tool to compute the arcus tangens. Second moment of the area (moment of inertia) Radius of gyration; Section modulus; Principal angles; Values about the principal axes for the above properties; Composite sections that consist of multiple shapes are also supported, such as those shown below. art_trackArticles. Moment of inertial is critical for. Material Use DB. The parallel axis theorem states that the moment of inertia about any axis is equal to the. Another coaxial disc with moment of inertia , which is at rest is gently | {
"domain": "campusdergenerationen.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986777179025415,
"lm_q1q2_score": 0.8044528205223533,
"lm_q2_score": 0.8152324938410784,
"openwebmath_perplexity": 673.9583066303479,
"openwebmath_score": 0.6343695521354675,
"tags": null,
"url": "http://campusdergenerationen.de/composite-moment-of-inertia-calculator.html"
} |
rate change... Otherwise specified, but other notations are defined by constructing explicit MakeExpression and MakeBoxes rules,. To modify the data structure if need be our instantaneous rate of change that is standardized are the instrumentation,. Method used to compensate industrial processes are of PI or PID type notation palette shown below Package you! Table 1: Upper and lower case greek letters on the other hand, key... Unless otherwise specified, but other notations are still widely used, especially application!, the Σ-notation will make these rules and formulas easier to express and.. Respect to a variable notation palette shown below per second the new notation being defined I what I wan write... Slope of the tangent line, or our instantaneous rate of change scenario, and establish some useful rules and. Series of functions such that a < x < b } is set-builder! Notations easily, intuitively, and graphically a concise and convenient way represent... Omega Table 1: Upper and | {
"domain": "naturechronicles.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9585377320263431,
"lm_q1q2_score": 0.8028903438389086,
"lm_q2_score": 0.8376199673867852,
"openwebmath_perplexity": 1158.576631297453,
"openwebmath_score": 0.9254204630851746,
"tags": null,
"url": "https://obc.naturechronicles.com/dvocm89/375231-pi-notation-rules"
} |
newtonian-mechanics, newtonian-gravity, orbital-motion, inertial-frames, celestial-mechanics
$$
Using these masses you can now use your initial expression for the orbital period,
$$
T_A = 2\pi\sqrt{\frac{a_A^3}{G\,\hat{m}_B}} = 2\pi\sqrt{\frac{a_A^3\,(m_A + m_B)^2}{G\,m_B^3}}, \tag{6}
$$
$$
T_B = 2\pi\sqrt{\frac{a_B^3}{G\,\hat{m}_A}} = 2\pi\sqrt{\frac{a_B^3\,(m_A + m_B)^2}{G\,m_A^3}}. \tag{7}
$$
Equation $(1)$ should also hold for the semi-major axes as well, so for the expression for $T_B$ could also be written as,
$$
T_B = 2\pi\sqrt{\frac{\left(a_A\frac{m_A}{m_B}\right)^3\,(m_A + m_B)^2}{G\,m_A^3}} = 2\pi\sqrt{\frac{a_A^3\,(m_A + m_B)^2}{G\,m_B^3}}, \tag{8}
$$
which is the same as the expression for $T_A$ in equation $(6)$. Calling this expression $T$ and rewriting it to a form similar as stated in your question yields,
$$
\frac{T^2\,m_B^3}{a_A^3\,(m_A + m_B)^3} = \frac{4\pi^2}{G\,(m_A + m_B)}. \tag{9}
$$
By again applying equation $(1)$ to the semi-major axes, then the left hand side of equation $(9)$ can be written as,
$$ | {
"domain": "physics.stackexchange",
"id": 35016,
"lm_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, newtonian-gravity, orbital-motion, inertial-frames, celestial-mechanics",
"url": null
} |
machine-learning, learning-theory
This is of course, not formal in any way, but say a baby is equipped with some neural network (of fixed depth), and upon receiving new data, the weights are updated accordingly using some algorithm.
The choice of neural network doesn't really matter, simply imagine that you have carefully studied the processes going on inside the human brain, and found out that the human learning process is similar to using a neural net.
In that case, the image of the learning algorithm is some class $\mathcal{F}$, say functions expressible by some fixed depth nets, and the success of the baby in learning new things simply means that the phenomena he's trying to learn is captured by $\mathcal{F}$ (so nothing magical/contradicting what you quoted is going on). | {
"domain": "cs.stackexchange",
"id": 8029,
"lm_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, learning-theory",
"url": null
} |
quantum-field-theory, differential-geometry, topology, yang-mills, solitons
$$g_{\alpha \beta} = \frac{1}{2e^2} \int \mathrm{d}^4 x \mathrm{Tr} \, \, (\delta_\alpha A_\mu)(\delta_\beta A_\mu)$$
with $\delta_\alpha A_\mu = \partial A_\mu / \partial X^{\alpha} + \mathcal{D}_\mu \Omega_\alpha$ where $\Omega_\alpha$ is an infinitesimal transformation, and $X^{\alpha}$ are the collective coordinates. How does one compute such a metric of a moduli space? Why should it be given by the sum of all zero modes?
I would prefer an answer which utilizes arguments from differential geometry, and topology. First let me refer you to Eric Weinberg's book where the instanton moduli space is described in more detail.
Principal bundles over 4-dimensional Riemannian manifolds are classified by the second Chern class = Instanton number and the t' Hooft discrete Abelian magnetic fluxes. Please see the following Lecture notes by Måns Henningson. | {
"domain": "physics.stackexchange",
"id": 12636,
"lm_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, differential-geometry, topology, yang-mills, solitons",
"url": null
} |
javascript, to-do-list
While this code is far from perfection, it has visible improvements.
Firstly, I use templates. Creating nodes directly is fine, but it is difficult to read such a code. When you have templates, you can made much more manipulation easely. Also it allows to use data. I made own function which parse template, but in real app it is preferred to use template engine (handlebars, mustache, jade, nunjucks).
Secondly, I separated blocks to methods. Now it has takes quite a little time to discover what happens in the code.
Now you can write your own example of the new app. Hope this will be helpfull. | {
"domain": "codereview.stackexchange",
"id": 18496,
"lm_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, to-do-list",
"url": null
} |
hector-slam
Title: ROS Answers SE migration: hector slam
hi guys, i tried to run the hector_slam with my bagfile .however the rviz doesn't show anything.
instead it come out this at the terminal.i have tried the SettingUpForYourRobot tutorial but it does not seem to work at all.
im rather new here,so please help me.thanks :D
[ WARN] [1427877911.218559354, 1378884604.791841348]: No transform between frames /map and scanmatcher_frame available after 20.001779 seconds of waiting. This warning only prints once.
[ INFO] [1427877911.716060193, 1378884605.295818198]: lookupTransform base_footprint to /laser timed out. Could not transform laser scan into base_frame.
[ INFO] [1427877912.220115826, 1378884605.799589257]: lookupTransform base_footprint to /laser timed out. Could not transform laser scan into base_frame.
[ INFO] [1427877912.723062304, 1378884606.302934693]: lookupTransform base_footprint to /laser timed out. Could not transform laser scan into base_frame. | {
"domain": "robotics.stackexchange",
"id": 21317,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "hector-slam",
"url": null
} |
atmospheric-science, spectroscopy, absorption, infrared-radiation
Although this is normally negligeable — as demonstrated above — the degree of cross-response towards water vapour depends critically on the filter characteristics on each channel. Indeed, in the example above we considered rather narrow (100 nm-wide) measurement and reference channels, and H$_2$O cross-response was thus not significant for CO$_2$ measurements. This generally holds true for CO$_2$ sensing as the CO$_2$ and water vapour absorbtion bands are quite distant from each other. Hence, even with measurement channels several hundreds of nanometer wide, this should not be an issue. | {
"domain": "physics.stackexchange",
"id": 98135,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "atmospheric-science, spectroscopy, absorption, infrared-radiation",
"url": null
} |
qiskit, programming
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[PauliSumOp(SparsePauliOp(['Z'],
coeffs=[4.28660705+0.j]), coeff=1.0)]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[PauliSumOp(SparsePauliOp(['I'],
coeffs=[4.28660705+0.j]), coeff=1.0)]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] | {
"domain": "quantumcomputing.stackexchange",
"id": 3652,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "qiskit, programming",
"url": null
} |
java, swing, audio, music
finalNote = (Integer.parseInt(octaveChoice.getText()) * 12) + extendedNote.indexOf(but.getText());
System.out.print(" (" + finalNote + ")\n");
playNote(finalNote, Integer.parseInt(instrumentChoice.getText()));
}
}
public void playNote(int finalNote, int finalInstrument) {
try {
Sequencer sequencer = MidiSystem.getSequencer();
sequencer.open();
Sequence sequence = new Sequence(Sequence.PPQ,4);
Track track = sequence.createTrack();
MidiEvent event = null;
ShortMessage first = new ShortMessage();
first.setMessage(192,1,finalInstrument,0);
MidiEvent changeInstrument = new MidiEvent(first, 1);
track.add(changeInstrument);
ShortMessage a = new ShortMessage();
a.setMessage(144,1,finalNote,100);
MidiEvent noteOn = new MidiEvent(a, 1);
track.add(noteOn); | {
"domain": "codereview.stackexchange",
"id": 8812,
"lm_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, swing, audio, music",
"url": null
} |
organic-chemistry, synthesis
Title: Can toluene be oxidized to benzoic acid using Pyridinium Chlorochromate(PCC)? My question stands:
Is it possible to oxidize toluene to benzoic acid using PCC? PCC is generally regarded as a milder oxidizing agent, used to effect selective oxidation of alcohols to aldehydes (from $1^{\circ}$ alcohols) or ketones (from $2^{\circ}$ alcohols). While over-oxidation to a carboxylic acid from a primary alcohol is definitely possible, PCC should not react with a simple unfunctionalized benzylic carbon.
However, oxidation at the benzylic position is easily achieved with more aggressive oxidizing agents. In particular, chromic acid (generated in situ from chromium salts in aqueous sulfuric acid, as in the Jones oxidation) as well as aqueous potassium permanganate will fully oxidize virtually any benzylic carbon all the way to the carboxylic acid, providing the benzylic carbon has at least one hydrogen. Of course, the rest of the chain is completely cleaved in the process. | {
"domain": "chemistry.stackexchange",
"id": 1345,
"lm_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
} |
rospy
Originally posted by Fiddle on Gazebo Answers with karma: 35 on 2018-01-24
Post score: 0
I've found an answer, the second parameter to model_coordinates needs to be an empty string.
Originally posted by Fiddle with karma: 35 on 2018-01-29
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by ljburtz on 2020-06-18:
precision about the "empty string":
that second argument to the service client call (model_coordinates() in this case) represents the relative_entity_name
As the docs say :
"leave empty or "world" will use inertial world frame"
http://docs.ros.org/melodic/api/gazebo_msgs/html/srv/GetModelState.html | {
"domain": "robotics.stackexchange",
"id": 4230,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rospy",
"url": null
} |
electromagnetism, thermodynamics, temperature, induction
Title: What happens at during the transition of solid to liquid in a magnet? So I just watched this video;
https://www.youtube.com/watch?v=8i2OVqWo9s0
and I did a little looking through my physics book, and online, but I couldn't find an answer that explained it in simple enough terms for me to understand.
Why does the magnet suddenly drop? I understand that the kinetic energy of the particles inside the magnet increases, therefore the magnet loses its magnetic properties at the moment that all the domains are no longer aligned, due to the particles vibration.
My question is why is it so sudden? and is there a way to work out how long it takes at certain temperatures for certain magnets to lose their magnetic properties? Reason of levitating : | {
"domain": "physics.stackexchange",
"id": 37352,
"lm_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, thermodynamics, temperature, induction",
"url": null
} |
data-cleaning, outlier
Title: Cleaning the univariate dataset with high noise At this time, I am having a dataset containing the operating duration for some sensors. This could be considered as a univariate dataset because it has only 1 dimension.
For example:
[1]: [10, 12, 13, 15, 16] indicates that the sensor [1] will have some operating duration like [10, 12, 13, 15, 16].
I want to see the range of operating duration for each sensor, by measuring the mean and standard deviation for each sensor. But my problem is in my dataset, each sensor has many noises. For example:
[1]: [1, 1, 1, 1, 1, 2, 2, 2, 10, 12, 13, 15, 16, 200, 400, 500]. | {
"domain": "datascience.stackexchange",
"id": 4178,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "data-cleaning, outlier",
"url": null
} |
Norm /@ (Mod[# n, 7] & /@ Range[6])
{Sqrt[51], Sqrt[22], Sqrt[11], 2 Sqrt[22], Sqrt[57], 2 Sqrt[11]}
which gives the same answer as the OP found by search.
More generally, the NullSpace of a is a collection of $m-n$ vectors, and it will be necessary to search over all linear combinations of these $m-n$ vectors (mod $q$) for the one with the smallest norm. While this may still be large, it is certainly smaller than search over $m$ dimensions as in the brute force approach.
-
Using Solve helps a bit. If vars is the list of variables, then
Solve[A.vars == ConstantArray[0, n], vars, Modulus -> q]
finds all solutions in terms of parameters C[1], C[2], etc. depending on the dimension of the solution space.
Another bottleneck is computing the values of the general solution at all possible combinations of values for the parameters C[i] modulo q. The possible combinations can be computed with
Tuples[Range[0, q - 1], n] | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9465966702001757,
"lm_q1q2_score": 0.8524385001140309,
"lm_q2_score": 0.9005297894548548,
"openwebmath_perplexity": 967.2872237186017,
"openwebmath_score": 0.22085921466350555,
"tags": null,
"url": "http://mathematica.stackexchange.com/questions/29383/finding-shortest-non-zero-vector-x-satisfying-ax-0-pmod-q"
} |
java, mvc, http
public HomeController(){
testimonialService = new TestimonialService();
priceService = new PriceService();
views = "/WEB-INF/views/";
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
page = request.getParameter("page");
pageNum = (request.getParameter("pageNum") == null )? 1: Integer.parseInt(request.getParameter("pageNum"));
int perPage = 6;
if(page != null){
switch (page){
case "home":
// get list of testimonials
testimonialList = testimonialService.getTestimonials(2);
// pass list of testimonials to the request object
request.setAttribute("testimonialList", testimonialList); | {
"domain": "codereview.stackexchange",
"id": 8596,
"lm_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, mvc, http",
"url": null
} |
quantum-gate, programming, qiskit
Title: Qiskit Controlled S and Controlled T Gates I was implementing controlled S and T gates in qiskit and was wondering if there is any difference between using the cu1 and crz gates for this purpose. Qiskit doesn't seem to include explicit versions of these two gates.
circuit = qiskit.QuantumCircuit(2)
# a)
circuit.crz(theta=math.pi/2, control_qubit=0, target_qubit=1)
# b)
circuit.cu1(theta=math.pi/2, control_qubit=0, target_qubit=1)
In terms of the unitary the cu1 gate seems closer to what one would want, I would assume. Are there any other consequences I should be aware of? In Qiskit you can get the controlled version of any gate with the method control.
For S and T, here is the example:
from qiskit.circuit.library.standard_gates import SGate, TGate
csgate = SGate().control(1) # the parameter is the amount of control points you want
ctgate = TGate().control(1)
circuit = QuantumCircuit(2)
circuit.append(csgate, [0, 1])
circuit.append(ctgate, [0, 1])
print(circuit) | {
"domain": "quantumcomputing.stackexchange",
"id": 2287,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-gate, programming, qiskit",
"url": null
} |
P would be that $\sqrt{2}$ is rational, Q that it is irrational, and so not(Q) is that it is not irrational.
• Why was this down-voted? – JLA Jul 15 '13 at 3:24
• Thanks! I figured specifying what Q is and then inferring what not(Q) is makes more sense than just saying what not(Q) is. – JLA Jul 15 '13 at 18:44
• And you were correct, but during my time here I have noticed downvoting here is not about correct/incorrect answers. Sometimes changing something doesn't attract the downvoters. – jimjim Jul 15 '13 at 22:54
• @TheChaz2.0 : cool dude, not here to offend anyone, apologies and removed. – jimjim Jul 16 '13 at 0:55
• I was one of the downvotes. With that $P$ and $Q$, the implication $P\implies Q$ reads "if $\sqrt2$ is rational, then $\sqrt2$ is irrational", which makes no sense. – Martin Argerami Jul 16 '13 at 20:19 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561712637256,
"lm_q1q2_score": 0.8451791342273398,
"lm_q2_score": 0.8723473713594992,
"openwebmath_perplexity": 319.94743806023104,
"openwebmath_score": 0.8737570643424988,
"tags": null,
"url": "https://math.stackexchange.com/questions/443809/whats-p-and-whats-q-in-this-classic-proof-of-the-irrationality-of-sqrt-2"
} |
a number of important problems involving polar coordinates are solved. Convert the following equation to polar coordinates: y = − 4 3 x 6. State three other pairs of polar coordinates for each point where —2m < 9 < 2m. By default, angles increase in the counterclockwise direction and decrease in the clockwise direction. 31) Polar coordinates can be calculated from Cartesian coordinates like. If you are looking for basic graph paper, then the Graph Paper Template is the resource you need. com, a free online dictionary with pronunciation, synonyms and translation. Math 2300 Practice with polar coordinates (c) r= 3sin2 0 1 2 3 0 ˇ=2 ˇ 3ˇ=2 Solution: The graph hits the origin at = ˇ 2 and = ˇ, = 3ˇ 2, and = 2ˇ. The method of setting, water coordinates in the AutoCAD by. as a function of. 11) ( , ), ( , ) 12) ( , ), ( , ) Critical thinking question: 13) An air traffic controller's radar display uses polar coordinates. Figure 3: Relationship between coordinate plane and polar plane determine | {
"domain": "quilianobike.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9923043516836919,
"lm_q1q2_score": 0.863897468000418,
"lm_q2_score": 0.8705972784807408,
"openwebmath_perplexity": 630.570451027436,
"openwebmath_score": 0.9171416759490967,
"tags": null,
"url": "http://cztg.quilianobike.it/polar-coordinates-pdf.html"
} |
2 years ago | {
"domain": "questioncove.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806552225684,
"lm_q1q2_score": 0.8254779506020143,
"lm_q2_score": 0.8418256532040708,
"openwebmath_perplexity": 283.0245341588067,
"openwebmath_score": 0.5842040181159973,
"tags": null,
"url": "https://questioncove.com/updates/55f52326e4b0cf7fa75bbeb9"
} |
bridges
Pollock, Emily (6 July 2018), Europe’s Longest Bridge Spans Troubled Waters, Engineering.com, archived from the original on 13 October 2018
Kerch Strait Bridge may collapse at any time – expert, UNIAN, 12 October 2018 Evaluating safety and risks involved in a project of this magnitude and complexity need a multifaceted scientific research, composed of teams representing different areas of technology, with experts to sample the soils, water current; chemical engineers, meteorologist, seismologists, etc, expensive imaging, testing machinery. It could cost millions of dollars and many years.
I had two classmates in college many years ago who spent their entire Ph.D. time doing an assessment of the safety of a small single span 110-foot bridge in Massachusets, with unlimited help from undergrad students at the lab.
Your question is way too ambitious for a site like this. | {
"domain": "engineering.stackexchange",
"id": 2546,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bridges",
"url": null
} |
visible-light
Here is an image to help you visualize. The black rectangle on the bottom-middle is the tube, with its width = $a$ and height = $L$, the blue lines represent the line of sight, the orange lines are the areas (at different distances) that contribute light to the sensor. Keep in mind that this is a 2d representation of a 3d system, this is why in the image the closest orange line has length of $3a$, which translates to an area of $(3a)^2 = 9a^a$ (like I said above). Same goes for the rest of the orange lines.
To put this into perspective (generously) if $L=100m$, and $a=0.1mm$ looking at the moon each sensor will collect light from an area of more than $5\cdot 10^5m^2$. The overlapping of the areas, each sensor collects, would be awful. You would probably see just a smudge. At this point multiple tubes are just pointless, as you would need an array of ridiculous size for the sensors that are furthest away to collect anything meaningfully different. | {
"domain": "physics.stackexchange",
"id": 57105,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "visible-light",
"url": null
} |
c#, performance, programming-challenge
double.Parse(lineSplit.Groups["price"].Value)
When you parse a numeric string you'll have to consider the current locale. So if the input number always uses '.' as decimal separator, you should parse with a IFormatProvider argument:
double.Parse(lineSplit.Groups["price"].Value, CultureInfo.InvariantCulture);
Otherwise the parser may interpret the price differently, if the current culture for instance uses ',' as separator.
If the price is in an invalid format, double.Parse will fail with an exception. You should handle that in a try...catch block, or use double.TryParse(...) instead and handle a false return from that appropriately.
When it comes to prices and currency, it is by the way common to use the decimal type instead of double.
When I try your method with the two provided input examples it prints " is not available!" near the top in both examples? | {
"domain": "codereview.stackexchange",
"id": 32999,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, programming-challenge",
"url": null
} |
general-relativity, metric-tensor, causality, qft-in-curved-spacetime, unruh-effect
$$
x^0 = \xi \sinh(\eta)\ , \ \ \ \ \ \ x^1 = \xi \cosh(\eta)
$$
The coordinates $(\eta,\xi,x^2,x^3)$ only cover $R_{+}$ and $R_{-}$.
One solves the Klein-Gordon equation $(\Box_{x} - m^2)r_{\mathbf{k}}(x) =0 $ for Rindler mode functions $r_{\mathbf{k}}$ (where $\mathbf{k} = (\Omega,k_2,k_3) \in (0,\infty) \times \mathbb{R} \times \mathbb{R}$ are the mode parameters), with the constraint that they are positive-frequency with respect to Rindler time $\eta$, ie. This means that $\frac{\partial}{\partial \eta} r_{\mathbf{k}} = - i \omega r_{\mathbf{k}}$ for some $\omega > 0$ (taking $r_{\mathbf{k}}^{\ast}$ gives you negative-frequency modes).
One finds that you need a separate solution in each of the Rindler wedges: So you have positive-frequency modes $r^{+}_{\mathbf{k}}$ in $\mathcal{R}_{+}$, and positive-frequency modes $r^{-}_{\mathbf{k}}$ in $\mathcal{R}_{-}$. A little more explicitly you find:
$$ | {
"domain": "physics.stackexchange",
"id": 50650,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, metric-tensor, causality, qft-in-curved-spacetime, unruh-effect",
"url": null
} |
electromagnetism
Title: Intensity of the Electromagnetic Waves I have trouble understanding the intensity of electromagnetic waves.
I already looked at this article and this question but didn't understand completely, where it is given that,
$$\text{Intensity} = \frac{\epsilon_0}{2} |\vec E|_{RMS}^2 V +
\frac{1}{2\mu_0} |\vec B|_{RMS}^2 V = \epsilon_0 E_\textrm{peak}^2 V$$
Is this the correct formula? Intensity generally refers to a power per area (energy per area per time). For an electromagnetic wave, you can find its intensity by computing the magnitude of the Poynting vector, and in most circumstances taking its time average.
For a plane wave and using SI units, the time-averaged intensity comes out to $\frac{1}{2} c \epsilon_0 E_0^2$ where $E_0$ is the peak electric field. This is almost the same as the formula in the article you linked to in your question, but the time-averaging contributes the factor of 1/2. | {
"domain": "physics.stackexchange",
"id": 7688,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism",
"url": null
} |
• Great answer, I'd also like to briefly note the parallels to the material derivative, $D/Dt = (\partial_t + v \cdot \nabla)$, and this "rotating" derivative: $D/Dt = (\partial_t + \omega \times)$. Thinking about this further may help solidify this result in your brain, as it did for me back when (also note the linking of inertial/rotating frames to lagrangian/eulerian frames). – Novice C Mar 12 at 14:39
• That's an interesting thought @NoviceC. However, I think the quantities $\omega \times (\cdot)$ and $v \cdot \nabla (\cdot)$ are conceptually more distinct than similar, with the only simlarity in form arising from the application of the chain rule. On the other hand, I there is a similarity in the product rule of complex numbers and the cross product of vectors. I think this is the key idea underlying the Hamiltonian product rule, but I have not mastered that topic yet. Let me know what you think. – kb314 Mar 12 at 17:06 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517456453798,
"lm_q1q2_score": 0.8085669070728122,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 259.02217426611804,
"openwebmath_score": 0.8803887963294983,
"tags": null,
"url": "https://physics.stackexchange.com/questions/535962/derivative-of-angular-momentum-in-a-rotating-frame-of-reference"
} |
organic-chemistry, experimental-chemistry, chromatography
There are different types of silanols as drawn in this paper: Sunseri, J.; Cooper, W. T.; Dorsey, J. G. Reducing residual silanol interactions in reversed-phase liquid chromatography: thermal treatment of silica before derivatization. J. Chromatogr. A 2003, 1011 (1-2), 23–29. DOI: 10.1016/S0021-9673(03)01070-7. | {
"domain": "chemistry.stackexchange",
"id": 14994,
"lm_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, experimental-chemistry, chromatography",
"url": null
} |
c#, interview-questions, state-machine
int currentState = 0; // 0 = Start
while ((currentState >= 0) && (currentState != 7))
{
Lexeme t = LexemeOfIntChar(Console.Read());
currentState = transition[currentState, (int)t];
switch (currentState)
{
case -1: Console.WriteLine("Invalid character!"); break;
case 6: Console.WriteLine("Hello"); break; // 6 = saw 'HELLO' with terminal symbol
}
}
}
The proposed exercise is to extend this interpreter to accept a "HELP" command that will print out:
"usage 'HelloScript <scriptfile' | {
"domain": "codereview.stackexchange",
"id": 716,
"lm_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#, interview-questions, state-machine",
"url": null
} |
Yes, but not as nice.
$x^{ab} = (x^a)^b$ for any complex number $x \ne 0$ and integers $a,b$. (*)
Here exponentiation is simply the result of starting from $1$ and repeatedly multiplying/dividing by $x$ where the number of times is specified by the exponent (multiplying for positive; dividing for negative). This fact holds in any structure that has invertible multiplication, including the field of rationals, the field of reals, and the field of complex numbers.
$x^{ab},x^a$ are well-defined since $x \ne 0$.
However, in general "$x^{ab} = (x^a)^b$" does not hold for complex $x$ even if $a,b$ are both rational. For instance (according to standard conventions):
$i = (-1)^{1/2} = (-1)^{(2 \times 1/4)} \ne ((-1)^2)^{1/4} = 1^{1/4} = 1$.
So it's excellent that you ask whether some new structure (complex numbers) have the same properties as some other structure (real numbers) instead of just blindly assuming it does. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513889704252,
"lm_q1q2_score": 0.8717965686111082,
"lm_q2_score": 0.8840392848011833,
"openwebmath_perplexity": 278.31217136572945,
"openwebmath_score": 0.9037195444107056,
"tags": null,
"url": "https://math.stackexchange.com/questions/2085268/does-i4-equal-1/2085325"
} |
the-sun, orbit, positional-astronomy
/**
* Returns the sun coordinates given a date.
*
* @remarks
* This method is adapted from the FORTRAN code in a paper by NASA workers Zhang, Stackhouse Jr., Macpherson, and Mikovitz, which can be found at https://doi.org/10.1016/j.renene.2021.03.047
*
* @param date - the UTC date for which to get relevant values. Uses JavaScript's Date object as type, but is interpreted as the count of milliseconds since the Unix epoch.
* @returns The coordinates (in degrees) of the sun in the sky using 0 N, 0 E as origin
*
* @beta
*/
export function date_to_sun_lat_long(date: Date) {
const degs = 180 / Math.PI
const rads = Math.PI / 180
const sundate = date || new Date(Date.now()) // UTC in milliseconds from Jan 1 1970
const jd = +sundate/86400000 + 2440587.5
const n = jd - 2451545.0 // fractional days since J2000
let L: number = (280.466 + 0.9856474 * n) % 360
let g: number = (357.528 + 0.9856003 * n) % 360 | {
"domain": "astronomy.stackexchange",
"id": 7024,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "the-sun, orbit, positional-astronomy",
"url": null
} |
software-defined-radio
The first low-pass filter has a decimation of 4, so the sampling rate at its output is 256 kHz. However, you have set the sampling rate of the FM receiver and the second LPF to 224 kHz. These should be 256 kHz.
The cut-off frequency of the first LPF is 150 kHz. This means a total passband of 300 kHz. This is larger than necessary, so you'll end up picking up more noise than the optimum.
You multiply the audio output by a constant factor of 2. This may be too little, or too much. I'd suggest using a slider to control the volume. If you connect a scope sink to the audio sink input, you'll be able to easily get the optimum gain: you want the signal to be withing [1,-1]. | {
"domain": "dsp.stackexchange",
"id": 2297,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "software-defined-radio",
"url": null
} |
flow or payment of a series of cash flows when the future value is known. Annuity Calculator & Quotes If you are considering buying an annuity, let us run you a free, no obligation quote to give you a better idea of what you can expect. Annuity. There is more info on this topic below the form. 40 for the house. Exercise #5. Present Value of an Annuity Calculator. e. RSL Funding pays the most money for your annuity – backed by our$1000 guarantee*! Our annuity lump sum calculator will give you the most accurate estimate of your cash payment because it uses an actual person. Whether you are investing or borrowing money does not change the calculation. A private investor is going to buy a 3-year fixed-rate bond with a semiannual coupon payment of $500. In any problems that you see “payment at the beginning” of some time period, this is the formula to use. *Remember to set your calculator to beginning mode* Real World Application: Capital Needs Analysis, and educational funding. Suppose | {
"domain": "com.ar",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808684361289,
"lm_q1q2_score": 0.8292611851880839,
"lm_q2_score": 0.8459424353665381,
"openwebmath_perplexity": 1389.7887079328416,
"openwebmath_score": 0.45728445053100586,
"tags": null,
"url": "http://verdevoto.com.ar/kyni/ifjw.php?kmsj=5&pgjkpzj=176&wp816=annuity-due-payment-calculator"
} |
Any rational number between 15/106 and 16/113 is closer to their mean than either of them.
Of course this mean 3391/(2*106*113) has denominator larger than 200. However if we examine the best approximations to this mean by rational numbers of increasing denominators, we will find if there are any before the denominator 200 is reached.
We say a rational number $p/q$ is a best rational approximation to real number $x$ iff no rational number with denominator of smaller absolute value is closer to x. Without loss of generality we restrict discussion to the case p,q,x > 0.
The sequence of such best rational approximations can be derived from the convergents of its continued fraction expansion. The convergents are themselves entries in this sequence, and the only other entries are "interpolants" between the convergents in the following sense. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.981735720045014,
"lm_q1q2_score": 0.8159628247088826,
"lm_q2_score": 0.8311430541321951,
"openwebmath_perplexity": 842.0531138883922,
"openwebmath_score": 0.7606256604194641,
"tags": null,
"url": "http://math.stackexchange.com/questions/11686/is-there-a-rational-number-with-denominator-not-greater-than-200-between-15-10"
} |
The perimeter of a polygon is equal to the sum of the length of its sides. It really helps us a lot. satpractice. I have had problems trying to get a formula to calculate the length of an arc of an epitrochoid that its created when a circle rolls around a circle involute. Some examples with transcendental functions. For lengths of chords and secants we've got ab=cd and a(a+b)=c(c+d). Length of curve = ∫ a b 1 + [ f ′ ( x ) ] 2 d x. The reason for this is that so many formulas become much easier to write and to understand when radians are used to measure angles. Note that the angle measure MUST be in radians when using this formula. The length of the first chord is W, and it is divided by the bisector into two equal halves, each with length W / 2. Many arc length problems lead to impossible integrals. The length of arc is equal to radius multiplied by the central angle (in radians). These are the formulas give us the area and arc-length (that is, the length of the "arc", or curved | {
"domain": "rainbow-media-berlin.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127420043056,
"lm_q1q2_score": 0.8192507824293622,
"lm_q2_score": 0.8289388040954683,
"openwebmath_perplexity": 332.0751837932216,
"openwebmath_score": 0.8941792845726013,
"tags": null,
"url": "http://hrxc.rainbow-media-berlin.de/arc-length-formula-calculus.html"
} |
astrometry
Title: Practical ways of measuring the sun-earth-moon angle? I learned as a child (and a common tale), that Aristarchus gave a method of measuring the sun-earth-moon angle to estimate the ratio of the earth-moon distance to the earth-sun distance. Indeed, during the first quarter moon phase, the sun-earth-moon reasonably form a right triangle at the moon.
I want to illustrate this to a math class that I am teaching, however I want some practical ways of measuring this sun-earth-moon angle. I reckon it will probably be a bad estimate anyway, as this angle might be nearly 90 degrees as the sun is quite far from the earth. But it might be a fun activity anyway. Are there any reasonable way to measure this angle with modest tools like a level and a plumb? (Or smart phones with a leveling tool.) Do I need to wait when both the sun and moon are visible in the sky during first quarter moon phase? Or, how did Aristarchus measured it, if he did at all? | {
"domain": "astronomy.stackexchange",
"id": 5924,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrometry",
"url": null
} |
python, beginner, object-oriented
Make an Account class
Store the accounts as a dictionary of Account objects by card number, not separated arrays of cards and PINs
Saying "PIN number" is redundant ("personal identification number number")
iin is never used; delete it
Make a convenience function to show a text menu and call an associated function reference
str(input()) is redundant; input already returns a string
Call input with a prompt string, not a blank
It's welcome, not welcom
Use f-strings for your digit formatting code
Do not use randint; use randrange since it's more natural to express an exclusive maximum here
Do not use randint for the PIN; use the secrets module for cryptographic strength
You were printing None because of your print(BankingSystem().main_welcom_screen()), which is meaningless because that function does not return anything
You have a critical bug where any combination of existing PIN and card number will allow login; but this should be a match to a specific card-PIN pair | {
"domain": "codereview.stackexchange",
"id": 40641,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, object-oriented",
"url": null
} |
regular-languages, context-free, pushdown-automata
The fundamental difference between PDAs and DFAs is their configuration space: you can represent the current "configuration" of a DFA by simply saying what state of the DFA the run is currently at, and from there you can continue reading the word. That is, the state gives you all the information you need to continue.
In contrast, in a PDA you need to know the state of the PDA as well as the entire contents of the stack, otherwise you might not know how to continue the run. Since the stack is unbounded, the number of possible configurations of a PDA is infinite.
Usually, the "reason" problems become undecidable is that there is some underlying infinite configuration space. This is not mathematically accurate, but it's a good intuition. | {
"domain": "cs.stackexchange",
"id": 19072,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regular-languages, context-free, pushdown-automata",
"url": null
} |
roslaunch
<arg name="image_topic" value="" unless="$(arg record_image)"/>
<arg name="image_topic" value="/image" if="$(arg record_image)"/>
Originally posted by Rufus with karma: 1083 on 2019-12-19
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Orhan on 2021-02-18:
This is the most up-to-date way so I marked this as the correct answer. | {
"domain": "robotics.stackexchange",
"id": 25255,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "roslaunch",
"url": null
} |
That seems to be the reason, BTW the $MaxMachineInteger in my v8 (Win 64 bit) is the same as that in 32 bit, not sure if it's just the nature of v8… – xzczd Sep 4 '14 at 1:56 Is using Big O notation in "Roughly O(10^4) times faster" a correct statement? It is surely 10^4 times faster in this example, but what exactly does O(10^4) times faster mean? – user Sep 4 '14 at 15:29 @bruce14 What I meant here is that it's roughly 4 orders of magnitude faster; faster than 10^3 and slower than 10^5. – Teake Nutma Sep 4 '14 at 17:15 There is a method by using Catch and Throw, and it gives result in about 90s. I think it can be improve a lot by Paralilize or ParallelEvaluate, but failed to finish that. i = 10^9 + {30, 70}; isMatchQ = If[IntegerDigits[#^2][[1 ;; -1 ;; 2]] == {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, Throw[#]] &; Catch[Do[isMatchQ /@ i; i += 100, {10^9}]] Edit I have found a way to speed up it by ParallelTable, this is the code: len = ((Sqrt[1.93*10^16] - 1*10^8)/40 // IntegerPart)*10; | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9559813501370535,
"lm_q1q2_score": 0.8481510567539349,
"lm_q2_score": 0.88720460564669,
"openwebmath_perplexity": 6092.915169769021,
"openwebmath_score": 0.3502996265888214,
"tags": null,
"url": "http://mathematica.stackexchange.com/questions/58751/how-to-speed-up-my-project-euler-code"
} |
Let me try to give a slightly different approach, which hopefully complements Jason's answer. Basically, let us compute as much as we can about the natural line bundles on the symmetric power.
First of all, the line bundle $O(-\Theta)$ on $\mathrm{Pic}^{g-1}(C)$ coincides with the line bundle $\det \mathrm{R\Gamma}$ (whose fiber over $\ell\in\mathrm{Pic}^{g-1}(C)$ is $\det\mathrm{R\Gamma}(C,\ell)$). I prefer to work with degree $g-1$ bundles on $C$ here, so that the $\Theta$ divisor is defined canonically, not just up to a shift. Your formula involves the pullback of $\Theta$ (or, equivalently, of this line bundle) under the map $$u_d:\mathrm{Sym}^dC\to\mathrm{Pic}^{g-1}(C):D\mapsto O(D+(-d+g-1)p_0),$$ but I would prefer to work with the map $$v_d:\mathrm{Sym}^dC\to\mathrm{Pic}^{g-1}(C):D\mapsto O(-D+(d+g-1)p_0),$$ which is algebraically equivalent to $-u_d$ (and $\Theta$ is invariant under the inversion anyway). | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808707404786,
"lm_q1q2_score": 0.8272542240214799,
"lm_q2_score": 0.8438951005915208,
"openwebmath_perplexity": 122.896794638112,
"openwebmath_score": 0.9687852263450623,
"tags": null,
"url": "https://mathoverflow.net/questions/234835/the-class-of-the-diagonal-in-the-symmetric-product-of-a-smooth-curve"
} |
quantum-mechanics, operators, commutator
$$
g(p) = {1\over \sqrt{2\pi}}\int\!\! dy ~~e^{iyp} \tilde g(y)~~~~\leadsto \\
\tilde g(y)= {1\over \sqrt{2\pi}}\int\!\! dp ~~e^{-iyp} g(p).
$$
Consequently
$$
[g(p),f(x)]= {1\over \sqrt{2\pi}}\int\!\! dy ~~ \tilde g(y)~~[e^{iyp},f(x)]\\= {1\over \sqrt{2\pi}}\int\!\! dy ~\bigl (f(x+y)-f(x)\bigr )~ \tilde g(y) e^{iyp},
$$
a numerical integral of functions in coordinate space when acting on a constant or translationally invariant state. | {
"domain": "physics.stackexchange",
"id": 76522,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, operators, commutator",
"url": null
} |
ros, moveit, ros-kinetic, ikfast
Originally posted by robonoob with karma: 36 on 2019-01-27
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by leander on 2022-07-07:
I am facing the same issue with an UR16e (6 dof robot). I checked the URDF and I believe that the axes are not aligned but I could be mistaken.
I also tried adding some small offsets to the joints, but then the solver cannot be generated.
Can you provide some more insight on what your issue was and what is the status of this bug?
Thanks! | {
"domain": "robotics.stackexchange",
"id": 32297,
"lm_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, moveit, ros-kinetic, ikfast",
"url": null
} |
graphs, computability, recursion, enumeration
If it is true (or one direction is true), may I please ask for a proof? Or some reference would be also appreciate (I searched it but did not obtain any useful result).
Note: It is from a math course (and I have asked in the math site). And I have not learnt about the related things about computer science (for instance, I have not learnt about the Turing machine and I have no skill of coding). So sorry I cannot understand explanations which involves the usage of terms in computer science. May I please ask for a mathematical approch please?
Thanks!
I have done some search but I cannot find some helpful material. Any reference would be appreciate to. Thanks a lot. A $k$-ary relation $R \subseteq \mathbb{N}^k$ is recursively enumerable if its indicator function $f_R$ defined by
$$f_R(n_1,\ldots,n_k) = \begin{cases} 1 & \text{if } R(n_1,\ldots,n_k) \\
0 & \text{otherwise} \end{cases}$$
is a partial recursive function. | {
"domain": "cs.stackexchange",
"id": 8966,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs, computability, recursion, enumeration",
"url": null
} |
System.out.println("The result is: " + getFactorialRecursively(inp));
We will enter 3 as input this time:
Enter a number:3
The result is: 6
We get the same result. But this time, what goes under the hood is rather interesting:
You see, when we enter the input, the method will check with the if block, and since 3 is greater than 1, it will skip to the else block. In this block, we see the line return n * getFactorialRecursively(n-1);.
We know the current value of n for the moment, it's 3, but getFactorialRecursively(n-1) is still to be calculated.
Then the program calls the same method once more, but this time our method takes 2 as the parameter. It checks the if block and skips to the else block and again encounters with the last line. Now, the current value of the n is 2 but the program still must calculate the getFactorialRecursively(n-1). | {
"domain": "stackabuse.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8001704776557338,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 1187.7449906322324,
"openwebmath_score": 0.40568989515304565,
"tags": null,
"url": "https://stackabuse.com/calculate-factorial-with-java-iterative-and-recursive/"
} |
context-free, regular-expressions
As a disclaimer, this is not a proof, but it shows the reasoning as to how I created an RE from the CFG you provided. To know if this is correct, you would need to know the exact language the CFG produces. Unfortunately, the grammar is not easily recognizable.
I used the following CFG Developer tool to help see a pattern from your grammar. | {
"domain": "cs.stackexchange",
"id": 20456,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "context-free, regular-expressions",
"url": null
} |
electrochemistry
solution, and metallic $\ce{Ag}$ will soon be formed on the $\ce{Mg}$ anode (or $\ce{Cu}$ on the $\ce{Zn}$ plate). No current will be emitted in the outer circuit. It is the end of the cell. So it is absolutely necessary to prevent the $\ce{Cu^2+}$ or $\ce{Ag+}$ ions to touch the anode, so the two compartments must be separated. | {
"domain": "chemistry.stackexchange",
"id": 13201,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrochemistry",
"url": null
} |
python, python-3.x, reinventing-the-wheel, integer, number-systems
What I would end up with looks like this:
def integer_to_binary_string2(int_value):
"""Converts integer to a string of base-2 bits,
example: 20 becomes '10100'
"""
if int_value == 0:
return "0"
bin_digits = floor(log2(int_value)) + 1
return "".join([
str(int_value // 2 ** i % 2)
for i in range(bin_digits)
])[::-1]
You can use a generator comprehension instead of a list comprehension, but as pointed out by @Graipher in the comments, in CPython str.join turns arbitrary iterables into lists as the very first step, negating any potential benefits. Generally speaking I prefer generator comprehensions to list comprehensions because they can be more memory efficient & are lazily evaluated, but they add no benefit here. | {
"domain": "codereview.stackexchange",
"id": 39639,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, reinventing-the-wheel, integer, number-systems",
"url": null
} |
In this problem one might guess the limit in another way: one might recognize that each of those fractions is the ratio of two Fibonacci numbers. Specifically, it looks very much as if $$b_k=\frac{F_{2k-3}}{F_{2k-1}}\;.$$
In fact this can be proved rather easily by induction: \begin{align*}f\left(\frac{F_{2k-3}}{F_{2k-1}}\right)&=\frac1{3-\frac{F_{2k-3}}{F_{2k-1}}}\\&=\frac{F_{2k-1}}{3F_{2k-1}-F_{2k-3}}\\&=\frac{F_{2k-1}}{2F_{2k-1}+(F_{2k-1}-F_{2k-3})}\\&=\frac{F_{2k-1}}{2F_{2k-1}+F_{2k-2}}\\&=\frac{F_{2k-1}}{F_{2k-1}+(F_{2k-1}+F_{2k-2})}\\&=\frac{F_{2k-1}}{F_{2k-1}+F_{2k}}\\&=\frac{F_{2k-1}}{F_{2k+1}}\;. \end{align*}
It’s well-known that $$\lim_{k\to\infty}\frac{F_{k+1}}{F_k}=\varphi\triangleq\frac12(1+\sqrt5)\;,$$ so | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9935117292506779,
"lm_q1q2_score": 0.8213478577564427,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 168.1587495262218,
"openwebmath_score": 0.9715055227279663,
"tags": null,
"url": "http://math.stackexchange.com/questions/117812/covergence-of-the-sequence-b-k1-frac13-b-k/117822"
} |
c#, functional-programming
You lost your workflow's progression because IAnalysisBuilder returns IAnalysisBuilder for each method call. IMO, all your subclasses should implement IAnalysisBuilder
public interface IAnalysisWaterTableDepth : IAnalysisBuilder
{
IAnalysisUeqProfile WithWaterTableDepth(double value);
IAnalysisUeqProfile WithoutGroundWater();
}
And your IAnalysisBUilder should return to good type of interface according to where you are in the object's creation workflow. I know nothing about your domain so let me make an example :
interface IBuilder
{
IBuilderWithSomeConstraint BuildWithFoo();
}
interface IBuilderWithSomeConstraint : IBuilder
{
IBuilderStepTwo BuildWithBar();
}
//So you can do :
IBuilder builder = new Builder();
//There Intellisense will be a tad more helpful.
builder.BuildWithFoo().BuildWithBar();
As for your builder itself, well, just take the code from the Analysis class that is used to build your object, and put it in a AnalysisBuilder class. | {
"domain": "codereview.stackexchange",
"id": 26560,
"lm_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#, functional-programming",
"url": null
} |
skyfield
From Nautical Almanac
achernar
Sha 335.36
Dec -57.13 Astronomical positions always come with a date on which they are accurate, the epoch.
If you compare data with a different reference frame (like from different catalogues), you have to compensate for the peculiar motion of the objects as well as changes in Earth's rotation (like nutation, precession etc) and other influences. These changes are not big, even when combined, but they are in the order of arc seconds up to arc minutes per year.
Ignoring the peculiar motion of the individual objects, and only taking into account changes to the earth's orbit and rotation, there are conversion formula or programmes one can apply to data at large to allow comparison of data with different reference epoch. | {
"domain": "astronomy.stackexchange",
"id": 6016,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "skyfield",
"url": null
} |
fourier-transform, spectrogram
$$f_\Delta = f_s/N$$
Note that this also corresponds directly to
$$f_\Delta = 1/T$$
A real sinusoid (perfectly sampled so that the frequency is directly on bin center) would have two non-real bins, one at index $k$ and the other at index $N-k$. (Just take the FFT of the test sine wave and plot the magnitude of the results to confirm this). If the sine wave used doesn't complete an exact integer number of cycles in the complete waveform used, additional spectral leakage will result but if we have an exact number of cycles in time, there will be only two non-real bins in frequency (I provide more details why at the very end). | {
"domain": "dsp.stackexchange",
"id": 11956,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fourier-transform, spectrogram",
"url": null
} |
python, homework, numpy, sliding-tile-puzzle, a-star
import heapq
import itertools
import numpy as np
class Board:
def __init__(self, board):
self.goalconfig = list(range(1, 16)) + [0]
self.board = board
self.distancefromstart = 0
self.parent = None
self.distance = self.calculate_distance()
def __repr__(self):
return ('\nBoard: \n{} \nDistance: {}\nFrom start:{}'.
format(np.matrix(self.board).reshape(4, 4),
self.getdistance(), self.distancefromstart))
def __gt__(self, board2):
return self.gettotaldistance() > board2.gettotaldistance()
def __lt__(self, board2):
return self.gettotaldistance() < board2.gettotaldistance() | {
"domain": "codereview.stackexchange",
"id": 23462,
"lm_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, homework, numpy, sliding-tile-puzzle, a-star",
"url": null
} |
electromagnetism, plasma-physics
When the particle moves upwards from $A$ to $B$, it gets accelerated, thus the radius of curvature of the particle trajectory increases.
Going downwards, from $B$ to $C$, the particle gets decelerated, and the radius of curvature of its trajectory decreases.
Finally, we get the spiraling trajectory with alternating radius of curvature. We can also note that:
1) At the bottom parts of the trajectory (near the points like $A$ and $C$) where the particle moves to the left, its velocity is lower by magnitude, so the motion to the left is suppressed in comparison to that to the right. Thus the average particle motion is to the right.
2) There is a symmetry between the trajectory sections $AB$ and $CB$ (the time reversed version of $BC$): they both start with the same initial velocity magnitudes and are just horizontally flipped. Due to this symmetry the particle accelerates at $AB$ by the same amount as decelerates at $BC$, thus the mean drift speed is constant. | {
"domain": "physics.stackexchange",
"id": 40862,
"lm_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, plasma-physics",
"url": null
} |
javascript, security, authentication, typescript, angular-2+
login(email: string, password: string) {
return this.http.post<any>(`${environment.apiUrl}/api/login`, { email, password }, {withCredentials: true})
.pipe(map(user => {
// login successful if there's a jwt token in the response
if (user && user.token) {
// store user details and jwt token in local storage to keep user logged in between page refreshes
// https://dev.to/rdegges/please-stop-using-local-storage-1i04
localStorage.setItem('currentUserToken', JSON.stringify(user));
this.currentUserSubject.next(user);
}
// set firstname & email of loggedin user
this.DataService.loggedinfirstname = user['firstname'];
this.DataService.loggedinemail = user['eMail'];
this.redirtoDashboard();
this.Toolbar();
this.DataService.prefillSenderData();
return user;
}));
} | {
"domain": "codereview.stackexchange",
"id": 39661,
"lm_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, security, authentication, typescript, angular-2+",
"url": null
} |
# Math Help - Induction Proof again :(
1. ## Induction Proof again :(
Hi all,
Once again I'm pretty stumped at this one.
3^3 = 27
3^4 = 81
3^5 =243
3^6 = 729
3^7 = 2187
Now these are the same practically. An even second to last digit and a seven as the last digit. So the pattern will loop. Just proving it seems a right pain! Any help at all would be appreciated.
2. Originally Posted by Jimbobobo
Hi all,
Once again I'm pretty stumped at this one.
3^3 = 27
3^4 = 81
3^5 =243
3^6 = 729
3^7 = 2187
Now these are the same practically. An even second to last digit and a seven as the last digit. So the pattern will loop. Just proving it seems a right pain! Any help at all would be appreciated.
I can't see your linked image, and I doubt anyone else can either.
RonL
3. Prove by induction that in the decimal form 3^n, the second from end digit is even. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668717616668,
"lm_q1q2_score": 0.8089347270735497,
"lm_q2_score": 0.8244619242200081,
"openwebmath_perplexity": 539.5700145250919,
"openwebmath_score": 0.8277087807655334,
"tags": null,
"url": "http://mathhelpforum.com/discrete-math/23223-induction-proof-again.html"
} |
python, beginner, tic-tac-toe
for x in range(3):
if abs(sum(mapB[x])) == 3: # checks for full rows
return "END"
elif abs(int(mapB[0][x]) + int(mapB[1][x]) + int(mapB[2][x])) == 3: # checks for full columns
return "END"
if abs(int(mapB[0][0]) + int(mapB[1][1]) + int(mapB[2][2])) == 3: # checks for full right diagonal
return "END"
elif abs(int(mapB[0][2]) + int(mapB[1][1]) + int(mapB[2][0])) == 3: # checks for full left diagonal
return "END"
counter = 0
def choice(): # allows the user to choose O or X
print("O or X?")
symbol = input().lower() # case insensitive
if symbol == "o":
return ["O", "X"]
elif symbol == "x":
return ["X", "O"]
else:
print("Invalid symbol")
return choice() # restarts the function if the user input neither O nor X | {
"domain": "codereview.stackexchange",
"id": 40970,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, tic-tac-toe",
"url": null
} |
optics, visible-light, refraction, air, shadow
Absorption: The light that hits the object is absorbed and converted to heat. A black table creates a shadow on the wall mostly by absorbing the light that hits it.
Reflection: The light that hits the object is reflected off the front surface and redirected to another part of the room. A silvery bowl creates a shadow on the wall by reflecting away the light that hits its front surface.
Refraction The light that hits the object passes through, but the light's direction is bent by the object. If the direction is bent enough, the light that passes through the object will be angled out of the forward-traveling beam. As a result, the beam will have a dark spot; a shadow. | {
"domain": "physics.stackexchange",
"id": 48998,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, visible-light, refraction, air, shadow",
"url": null
} |
ros, installation, rosmake
[rosmake-0] Finished <<< roscpp No Makefile in package roscpp
[rosmake-0] Starting >>> geometry_msgs [ make ]
[rosmake-0] Finished <<< geometry_msgs No Makefile in package geometry_msgs
[rosmake-0] Starting >>> sensor_msgs [ make ]
[rosmake-0] Finished <<< sensor_msgs No Makefile in package sensor_msgs
[rosmake-1] Starting >>> pr2_hardware_interface [ make ]
[rosmake-0] Starting >>> summit_xl_joystick [ make ]
[rosmake-1] Finished <<< pr2_hardware_interface ROS_NOBUILD in package
pr2_hardware_interface
[rosmake-1] Starting >>> colladadom [ make ]
[rosmake-1] Finished <<< colladadom ROS_NOBUILD in package colladadom
[rosmake-1] Starting >>> urdf_interface [ make ]
[rosmake-1] Finished <<< urdf_interface ROS_NOBUILD in package urdf_interface | {
"domain": "robotics.stackexchange",
"id": 11949,
"lm_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, installation, rosmake",
"url": null
} |
c#, beginner, winforms
namespace Bounce;
public class Ball
{
Pen Pen = new Pen(Color.White);
PointF Position;
PointF Speed;
float Radius;
static Random Random = new Random();
private Rectangle Bounds;
public Ball(float x, float y, float radius)
{
Position = new PointF(x, y);
Bounds = new Rectangle((int)x - (int)radius, (int)y - (int)radius, (int)radius * 2, (int)radius * 2);
var xd = Random.Next(1, 6);
var yd = Random.Next(1, 6);
if (Random.Next(0, 2) == 0) xd = -xd;
if (Random.Next(0, 2) == 0) yd = -yd;
Speed = new PointF(xd, yd);
Radius = radius;
}
public void Draw(Graphics g)
{
g.DrawEllipse(Pen, Position.X - Radius, Position.Y - Radius, 2 * Radius, 2 * Radius);
} | {
"domain": "codereview.stackexchange",
"id": 44396,
"lm_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, winforms",
"url": null
} |
electricity, electrostatics
Title: What happens to this potential energy? Let's say I turn on a Van de Graaff which creates a large positive charge. Now let's say I have an object with a positive charge in my hand and I start walking toward the Van de Graaff from $x$ meters away. If I walk an arbitrary distance towards the Van de Graaff, I am doing work and the charge in my hand is gaining potential energy. Now somebody standing next to the Van de Graaff suddenly turns it off. What happens to that potential energy of the charge? By the conservation of energy it should be conserved somehow, but it appears not to be. Any help is appreciated. The Van de Graaff generator itself has stored potential energy, even without the extra charged object. Like a capacitor, there will be energy stored in the electric field. When you turn the generator off, this energy doesn't vanish by itself but either dissipates slowly through corona discharge, or quickly by arc discharge. | {
"domain": "physics.stackexchange",
"id": 6802,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, electrostatics",
"url": null
} |
ros, localization, navigation, ros2, amcl
Originally posted by root-robot on ROS Answers with karma: 43 on 2021-09-13
Post score: 1
So you say you aren’t looking for mapping,
but remember that when you say “localize” you had have to localize yourself w.r.t something, a reference. I would guess what you mean is, you just want an odometry estimation, meaning that you want to recieve your localization information w.r.t your initial pose ? Is this what you mean ?
If so, you are not limited to use laser scanner/lidar based slam methods. You can also use a camera based visual slam method such as RTABMap, OpenVSLAM or ORB-SLAM. I have used AMCL but haven’t used the other one, and as far as I remember you had need to provide a prebuilt map, and guessed initial pose to AMCL to start localization. In addition to both those methods there is google cartographer slam package,
Originally posted by Fetullah Atas with karma: 819 on 2021-09-14
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 36903,
"lm_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, localization, navigation, ros2, amcl",
"url": null
} |
attendant Lipschitz condition (1. We introduce a new algorithm for the numerical computation of Nash equilibria of competitive two-player games. The quality of the IP solution highly depends on the quantity of IP data and positions of receivers. We introduce a new approach for computing a gradient in the descent method in order to use as much IP data as possible on each iteration of descent. Proximal gradient descent is a generalization of it, where we use the proximal operator in place of the projection operator. Zubeldia, and N. There are marked demographic differences in lupus prevalence, with women being 8–10 times more likely than men to develop lupus and African Americans being 3–4 times more likely than Caucasian Americans to develop disease. And later in the class, we'll use gradient descent to minimize other functions as well, not just the cost function J for the linear regression. The primal-dual hybrid gradient method reduces to a primal method for linearly constrained | {
"domain": "solotango.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877002595527,
"lm_q1q2_score": 0.8007928515520129,
"lm_q2_score": 0.8152324938410784,
"openwebmath_perplexity": 812.3753183691457,
"openwebmath_score": 0.7619852423667908,
"tags": null,
"url": "http://solotango.it/yers/projected-gradient-descent-analysis.html"
} |
planetary-formation, terminology
Title: Envelope Enrichment? While I was researching about planet formation, I repeatedly came across the term envelope enrichment. What does this mean?
I searched it up and looked at many websites, but no helpful definitions showed.
Thanks in advance! In the accretion phase of a planet, along with the H/He gas, there are dust particles or heavy elements in the gas phase accreted into the outer shell of a planet (or THE planet in the case of gas giants).
Should the fraction of this heavy element X in relation to H/He, i.e. the number $\rm [X/H]$ increase through this process, we speak of enrichment. If it decreases, we speak of depletion. | {
"domain": "astronomy.stackexchange",
"id": 5935,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "planetary-formation, terminology",
"url": null
} |
evolution, botany, plant-physiology, photosynthesis
Of course, this is still no explanation why leaves are not simply black — absorbing all light is surely even more effective, no? I don't know enough about organic chemistry, but my guess would be that there are no organic substances with such a broad absorption spectrum and adding another kind of pigment might not pay off.
Are there nothing other than educated guesses at an answer? And why not use a combination of pigments, instead of a single, broad-spectrum absorbing pigment? For example, some metabolic pathways use parallel processes. Quoth the Wackypedia: | {
"domain": "biology.stackexchange",
"id": 12370,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, botany, plant-physiology, photosynthesis",
"url": null
} |
doesn't seem capable of doing a full multivariate expansion. Mathews 2004. Access data and computations when and where you need it, optimized for mobile and touch devices. It is used most often when the system in question has periodic behavior. Style Sheet for 3. Overview of Fourier Series - the definition of Fourier Series and how it is an example of a trigonometric infinite series. Acta Mathematica Scientia is no longer published by Elsevier. CHAPTER 4 FOURIER SERIES AND INTEGRALS 4. Wolfram Mathematica 12 Full Version Free. This first series covers some basic theory and elementary examples of common neural algorithms. Mathematica » The #1 tool for creating Demonstrations and anything technical. Summations in Mathematica are done using the Sum command. For both series, the ratio of the nth to the (n-1)th term tends to zero for all x. About this journal. Work with quantities in time series. It is very di erent from just about any other software paradigm out there. Let's consider the | {
"domain": "cascsub.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305318133554,
"lm_q1q2_score": 0.8026836931155493,
"lm_q2_score": 0.8333245953120233,
"openwebmath_perplexity": 1062.2757806070022,
"openwebmath_score": 0.2423764318227768,
"tags": null,
"url": "http://reon.cascsub.it/mathematica-series.html"
} |
neural-networks
Title: Does reinforcing correct predictions increase model accuracy further? Let's say I've trained a CNN that is predicting/inferring live samples that it hasn't seen before. In the event the network makes a correct prediction, would including this as a new sample in its training set increase the model accuracy even further when re-training the network?
I'm unsure about this since it seems as though the network has already learnt the necessary features for making the correct prediction, so adding it as a new training sample might be redundant. On the other hand it might also reinforce to the network that it's on the right track, perhaps giving it further confidence to generalize with whatever features its learnt in regards to that class, that it might be able to apply to the same class in other images it might otherwise make an incorrect prediction with? | {
"domain": "ai.stackexchange",
"id": 1099,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks",
"url": null
} |
phase-transition, non-equilibrium
Title: Non-equilibrium phase transition I have come across the term Non-equilibrium phase transition. And unfortunately I can't find any examples of such a phenomenon.
What examples of nonequilibrium phase transitions are known? Are there some analogies with "Ising-like" models, which clarify the main peculiarity of such transitions? How to distinguish such a transition from equilibrium phase transitions? Non-equilibrium phase transitions may mean different things, depending on the context: it could refer to dynamical critical phenomena or to dissipative structures. | {
"domain": "physics.stackexchange",
"id": 79871,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "phase-transition, non-equilibrium",
"url": null
} |
6
Checking for smoothness can be computationally expensive, depending on the size of the "small" primes (there is no "natural" definition of "small", one has to define an arbitrary limit). Also, it is not really useful. The need for non-smooth integers comes from the $p-1$ factorization method. Let $n = pq$ be a RSA modulus that we wish to factor. Now suppose ...
6
For Diffie-Hellman or any variants like Elgamal or DSA, you're better off using the established primes. It doesn't matter what primes you use, really, as long as they're prime. The standard primes have had someone nod at them. If you generate your own prime and there's a problem (e.g. it's not really prime), then you're on your own and we will all laugh at ...
6 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.958537730841905,
"lm_q1q2_score": 0.8069216475829357,
"lm_q2_score": 0.8418256492357359,
"openwebmath_perplexity": 536.1070324871646,
"openwebmath_score": 0.7430502772331238,
"tags": null,
"url": "http://crypto.stackexchange.com/tags/prime-numbers/hot"
} |
c#, performance, coordinate-system
public VectorX Lerp(VectorX to, float amount)
{
if (to.VectorCount != VectorCount) throw new Exception("Vectors have different length");
else
{
amount = Math.Clamp(amount, 0, 1);
for (int i = 0; i < VectorCount; i++)
{
VectorValues[i] = (VectorValues[i] - to.GetAt(i)) * amount + to.GetAt(i);
}
return this;
}
}
public float Dot(VectorX other)
{
if(other.VectorCount != VectorCount) throw new Exception("Vectors are not the same length");
else{
float d = 0;
for (int i = 0; i < VectorCount; i++)
{
d += VectorValues[i] * other.GetAt(i);
}
return d;
}
} | {
"domain": "codereview.stackexchange",
"id": 35995,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, coordinate-system",
"url": null
} |
php, authorization
So, this switch is in a foreach, that gets the $user entity, then with the result of the list box from the view, I get the rights of the user which can be (for now) EDIT VIEW or OPERATOR. These right were chosen because they are directly related to the MaskBuilder masks.
The thing is, if there is a refactor to be done, I will need to modify this switch AND the part where the form is defined. I would like to do something like
$mask = 'MASK_' . $participant->getRight();
$this->aclManager->addObjectPermissions($project, MaskBuilder::$mask, $user);
But havn't find a way to do it.
Is my switch a good way to do it ? Or is there a proper php way to do the same, that would reduce refactor cost? I found the solution somewhere from the documentation. I don't know why I had not seen that before.
Symfony2 provides an easier way of doing what I was looking for:
$builder = new MaskBuilder();
$mask = $builder->add($participant->getRight())->get(); | {
"domain": "codereview.stackexchange",
"id": 3098,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, authorization",
"url": null
} |
java, graph, complexity, depth-first-search
graph.addNode(one);
graph.addNode(two);
graph.addNode(three);
graph.addNode(four);
graph.addNode(five);
graph.addNode(six);
graph.addEdge(one, two);
graph.addEdge(one, three);
graph.addEdge(one, four);
graph.addEdge(two, five);
graph.addEdge(two, six);
graph.addEdge(three, six);
graph.addEdge(two, one);
graph.addEdge(three, one);
graph.addEdge(four, one);
graph.addEdge(five, two);
graph.addEdge(six, two);
graph.addEdge(six, three);
CycleDetection detection = new CycleDetection(graph);
detection.detectCycles(six);
}
public static void main(String[] args) {
Node zero = new Node("0");
Node one = new Node("1");
Node two = new Node("2");
Node three = new Node("3");
Node four = new Node("4");
Node five = new Node("5");
Graph<Node> graph = new Graph<Node>(); | {
"domain": "codereview.stackexchange",
"id": 16514,
"lm_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, graph, complexity, depth-first-search",
"url": null
} |
rospy
Looks like you're passing the tuple (self, sb) as the callback args and this tuple now is passed to the callback function under the name sb. | {
"domain": "robotics.stackexchange",
"id": 13050,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rospy",
"url": null
} |
java, gui
/**
* Returns the length of this vector.
*
* @return the length of this vector.
*/
public float getLength() {
return length;
}
/**
* Sets the new length of this vector. If this vector has child vectors,
* they are moved as well.
*
* @param length the new length.
*/
public void setLength(float length) {
this.length = length;
Point2D.Float point = getHeadLocation();
for (Vector2D childVector : childVectors) {
childVector.setLocation(point.x, point.y);
}
}
/**
* Gets the angle of this vector.
*
* @return the angle of this vector.
*/
public float getAngle() {
return angle;
} | {
"domain": "codereview.stackexchange",
"id": 19572,
"lm_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, gui",
"url": null
} |
# Derivative for a0
My Code:
Can the derivative of a0 be explained? When following along on paper and using the chain/power rule I get
d'(a0) = 2(a0+a1x1^(i) - y^(i)) * d'(a0)(a0 +a1x1^(i) - y^(i))
What I expected to happen:
I expect that the remaining derivative term becomes a constant
What actually happened:
d'(a0) = 2(a0+a1x1^(i) - y^(i))
In the previous example with d’(a1), the derivative term became a constant. In the d’(a0) example, the derivative term simply no longer exists. I am trying to follow along doing the proof on paper but uncertain what happens to the derivative term in d’(a0)
Yes, that’s correct.
\frac{d}{da_0}MSE(a_0, a_1) = \frac{1}{n}\sum\limits_{i=1}^{n}2*(a_0 + a_1x_1^{(i)} - y^{(i)})*\frac{d}{da_0}(a_0 + a_1x_1^{(i)} - y^{(i)})
Now, for
\frac{d}{da_0}(a_0 + a_1x_1^{(i)} - y^{(i)})
we get
\frac{d}{da_0}a_0 + \frac{d}{da_0}(a_1x_1^{(i)}) + \frac{d}{da_0}y^{(i)} | {
"domain": "dataquest.io",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731169394881,
"lm_q1q2_score": 0.8346720107717382,
"lm_q2_score": 0.867035752930664,
"openwebmath_perplexity": 1082.6337241830104,
"openwebmath_score": 0.8540281057357788,
"tags": null,
"url": "https://community.dataquest.io/t/derivative-for-a0/554427"
} |
• @irchans Perhaps the reason you think that your example is a counter example is because of the $\textit{weirdness}$ of bases of infinite dimensional vector spaces. Notice that a subset $S$ of a vector space $V$ is said to be a basis if and only if every element $v \in V$ can be written as a $\textbf{finite}$ linear combination of the elements of $S$, and that there is no finite non-trivial linear relation amongst the elements of $S$. – Adam Higgins Jan 3 at 19:19
• Thank you very much ! – irchans Jan 3 at 19:27
• This set of notes seems relevant math.lsa.umich.edu/~kesmith/infinite.pdf – irchans Jan 3 at 19:38 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9918120896142623,
"lm_q1q2_score": 0.9132503357744666,
"lm_q2_score": 0.920789679151471,
"openwebmath_perplexity": 65.96755087668768,
"openwebmath_score": 0.9572270512580872,
"tags": null,
"url": "https://math.stackexchange.com/questions/3060802/is-v-isomorphic-to-direct-sum-of-subspace-u-and-v-u"
} |
stellar-evolution, white-dwarf, red-giant, red-dwarf
Title: If Sunlike stars become a red giant and eventually a white dwarf, what do red dwarfs become? The Sun is said to become a red giant at the end of its life (before that it will become an orange subgiant first and then an orange giant or so) and after ejecting its outer layers it should become a white dwarf. If yellow dwarfs like the Sun become red giants, what do red dwarfs become? Even redder giants? How do the red giants of former red dwarfs (say Proxima Centauri) differ from those of former yellow dwarfs (say the Sun) and how would Proxima's white dwarf be different from the Sun's white dwarf? I mean, a red dwarf's eventual white dwarf would be much less massive than that of the Sun, right? A relevant paper here is Laughlin, Bodenheimer & Adams (1997) "The End of the Main Sequence". From the abstract: | {
"domain": "astronomy.stackexchange",
"id": 4698,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "stellar-evolution, white-dwarf, red-giant, red-dwarf",
"url": null
} |
c#, console
This code already looks better but you can take this a step further. You see three similar blocks with following structure:
Set a color
Write a part
Set a color again
Write a part again
This can be extracted in two ways: take step 1 and 2 and place it in a method or take step 1 to 4 and extract it. Here's the method when taking all steps in one method:
private static void WritePart(ConsoleColor startColor, ConsoleColor endColor, string partOne, string partTwo, bool newLine)
{
Console.ForegroundColor = startColor;
Console.Write(partOne);
Console.ForegroundColor = endColor;
Console.Write("{0}{1}", partTwo, newLine ? Environment.NewLine : "");
}
And here's the usage for the three blocks:
WritePart(ConsoleColor.White, ConsoleColor.Green, String.Format("[{0}] ", time), "<", false);
WritePart(ConsoleColor.Blue, ConsoleColor.White, GetCodeFromUserLevel(level), userName, false);
WritePart(ConsoleColor.Green, ConsoleColor.White, "> ", message, true); | {
"domain": "codereview.stackexchange",
"id": 10644,
"lm_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#, console",
"url": null
} |
algorithm, game, prolog
A puzzle is defined graphically by a list of strings as shown in the example below.
A square is an operator followed by an integer, and an optional group id (a letter). For example, '+12' or '*3f'. All squares and column constraints must line up under the top square in the column (they must overlap).
A constraint is an optional group id, and operator ('=' or '#'), and then an int. An '=' sign means the formula equals the int. A '#' means that many squares are ON. For example, '=8', '#1', or 'f#5'.
Puzzle.solver() returns a list of 0/1 that corresponds to the squares in left-to-right, top-to-bottom order. A '1' means the square is ON and a '0' means it's OFF.
Here's your example coded for this solver:
puzzle = [
" +1a +2a *4a +2 =4",
" +2a *2a +2a +1 =5",
" +1 *2 *2a *3a *2a *3 *4 +8 =24",
" +1a *2a +2a *2 =2",
" +3 +3 *2 *2 =6", | {
"domain": "codereview.stackexchange",
"id": 36064,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm, game, prolog",
"url": null
} |
scikit-learn, svm, kernel
Title: How do I interpret the length-scale parameter of the RBF kernel? According to the Scikit-Learn documentation for the RBF kernel:
The length scale of the kernel. If a float, an isotropic kernel is used. If an array, an anisotropic kernel is used where each dimension of l defines the length-scale of the respective feature dimension.
I am currently working on a problem where I am setting the length-scale of each individual feature (which I assume is synonymous with dimension here). My understanding is that a smaller length scale implies a more complex function.
My question is, can I use this parameter to explain how well a certain feature will help a model generalize to new data?
For example, if I have a data set which, after optimizing the length-scale value looks like this:
[Feature_1: length-scale = 20]
[Feature_2: length-scale = 1]
[Feature_3: length-scale = 5] | {
"domain": "datascience.stackexchange",
"id": 3710,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "scikit-learn, svm, kernel",
"url": null
} |
regular-languages, automata, finite-automata, computation-models
However, the composition you've attempted doesn't actually make sense. Since $f$ is the transition function of an NFA, it has type $Q\times\Sigma\to 2^Q$. As such, you can't write $f(f(q_i,\sigma))$, since the argument of the outer application of $f$ is some subset of $Q$, whereas there are supposed to be two arguments: an element of $Q$ and a symbol from the alphabet. So, for a double-composition, you probably need to write something like
$$\bigcup\{f(q,\sigma)\mid q\in f(q_i,\sigma)\}\,.$$
You can try to work out the triple-composition yourself.
But are you sure you want to do that? You're defining an automaton that says "Every time I read the character $\sigma$, I will do whatever the original automaton would have done if it read three $\sigma$s." As I said, you can make your automaton do whatever you want, but I'd be interested to know the context that makes this a sensible thing to do. | {
"domain": "cs.stackexchange",
"id": 10141,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regular-languages, automata, finite-automata, computation-models",
"url": null
} |
java, performance, multithreading, thread-safety, atomic
@Override
public DataResponse call() {
ResponseEntity<String> response = null;
// construct what are the hostnames I can call basis on user id
List<String> hostnames = some_code_here;
for (String hostname : hostnames) {
// If host name is null or host name is in block list, skip sending request to this host
if (DataUtils.isEmpty(hostname) || DataMapping.isBlocked(hostname)) {
continue;
}
try {
String url = createURL(hostname);
response = restTemplate.exchange(url, HttpMethod.GET, key.getEntity(), String.class);
resetFailedCallCount(hostname); | {
"domain": "codereview.stackexchange",
"id": 13962,
"lm_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, performance, multithreading, thread-safety, atomic",
"url": null
} |
Why don't I get a solution and what is the meaning of "Assuming that $x$ is constant on the relevant time scale". Does that mean x is at steady state?
• DSolve can't solve many nonlinear systems, because no closed form solutions exist. The statement about assuming $x$ is constant is an extra assumption the authors make to get a solution. More background info would be helpful in interpreting that statement: what's the model of and what is the book? – Chris K Sep 3 '17 at 14:39
• If x is actually constant, dx/dt is zero and this is a linear system. But there is information missing -- how can the solution not involve beta or lambda? What constant value is assumed for x? – bill s Sep 3 '17 at 14:45
Update Added going beyond the text perturbatively with comparison against numerics.
# Recovering Text-book
So the problem you're running into is that Mathematica's just not able to solve the differential equations exactly given the constraints you've offered. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214480969029,
"lm_q1q2_score": 0.8056747002860101,
"lm_q2_score": 0.8354835432479661,
"openwebmath_perplexity": 8741.540128868553,
"openwebmath_score": 0.23895035684108734,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/154983/solving-system-of-differential-equations"
} |
If you enjoyed this lesson, why not get a free subscription to our website. These two triangles are of the same size and shape. If you are a subscriber to Passy’s World of Mathematics, and would like to receive a free PowerPoint version of this lesson, that is 100% free to you as a Subscriber, then email us at the following address: Please state in your email that you wish to obtain the free subscriber copy of the “Congruent Triangles” Powerpoint. Richard Wright, Andrews Academy . In other words, Congruent triangles have the same shape and dimensions. This indicates that the corresponding parts of congruent triangles are equal. He cuts two right-angled triangles out of paper. The congruence of two objects is often represented using the symbol "≅". Such figures are called congruent figures. Under this criterion, if the three sides of one triangle are equal to the three corresponding sides of another triangle, the two triangles are congruent. Here is a drawing that has several angles. | {
"domain": "riyadhconnect.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.975946444307138,
"lm_q1q2_score": 0.8371357250081932,
"lm_q2_score": 0.8577680977182187,
"openwebmath_perplexity": 1064.257635843876,
"openwebmath_score": 0.20047952234745026,
"tags": null,
"url": "https://riyadhconnect.com/jsqynqbm/d12b61-congruent-triangles-examples"
} |
an injection and a surjection. The function f: ℝ2-> ℝ2 is defined by f(x,y)=(2x+3y,x+2y). Let b 2B. The range of a function is all actual output values. It means that each and every element “b” in the codomain B, there is exactly one element “a” in the domain A so that f(a) = b. Thus, bijective functions satisfy injective as well as surjective function properties and have both conditions to be true. Then f has an inverse. Show that f is bijective and find its inverse. So x 2 is not injective and therefore also not bijective and hence it won't have an inverse.. A function is surjective if every possible number in the range is reached, so in our case if every real number can be reached. Let f: A → B. In order to determine if $f^{-1}$ is continuous, we must look first at the domain of $f$. A function f (from set A to B) is bijective if, for every y in B, there is exactly one x in A such that f(x) = y. Alternatively, f is bijective if it is a one-to-one correspondence between those sets, | {
"domain": "drvivianlee.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018398044143,
"lm_q1q2_score": 0.8147650885017276,
"lm_q2_score": 0.8354835432479661,
"openwebmath_perplexity": 635.9812801373125,
"openwebmath_score": 0.9162711501121521,
"tags": null,
"url": "http://drvivianlee.com/chazz-reinhold-dqhewg/dedb9b-is-the-inverse-of-a-bijective-function-bijective"
} |
objective-c, ios, gui, cocoa-touch
return ret;
}
This pattern can be applied to all three methods. There's no need to go through the process of creating or reassigning these values each time the method is called. Background image is only different depending on iOS version, which won't change while your app is running. And textInserts is only different depending on whether or not the device is an iPad... and that will never change. And default font never changes.
There's not a big difference here, but using this pattern, you'll run ever so slightly faster, and potentially be using a bit less memory.
[self addSubview:_textView];
[self bringSubviewToFront:_textView];
I'm quite sure the bringSubviewToFront is redundant here. addSubview: adds the view at the front. The only place I can imagine bringSubviewToFront is perhaps if you added an else to match if (_textView == nil). If _textView isn't nil, then we can at least make sure it's the front-most view. | {
"domain": "codereview.stackexchange",
"id": 6178,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "objective-c, ios, gui, cocoa-touch",
"url": null
} |
Grand total of three cases = 3 + 61 + 36 = 100.
- 5 years, 7 months ago
Ans to Q6) 173
- 6 years, 5 months ago
Sorry, but the answer is $100$.
- 6 years, 5 months ago | {
"domain": "brilliant.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9653811611608241,
"lm_q1q2_score": 0.8044758594520682,
"lm_q2_score": 0.8333245891029456,
"openwebmath_perplexity": 1310.4586195017107,
"openwebmath_score": 0.9550597667694092,
"tags": null,
"url": "https://brilliant.org/discussions/thread/rmo-2014-full-paper-discussion/"
} |
optimization, correctness-proof, greedy-algorithms
$\quad$A X X A X X A B _ _ B _ _
we will have
$\quad$A B X X A B X X A.
Note that the cooldown periods between all existing tasks of the same type are at least as large as before. The cooldown periods between Bs are as long as the cooldown periods between As, so they are no shorter than the minimum as well.
If we have addition overflowing tasks, such as CC, then we can do the same thing, inserting them one right after each A. So we would have
$\quad$A C B X X A C B X X A.
Note that the cooldown periods between all existing tasks of the same type are at least as large as before. The cooldown periods between Cs are as long as the cooldown periods between As, so they are no shorter than the minimum as well.
And so on. | {
"domain": "cs.stackexchange",
"id": 17135,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optimization, correctness-proof, greedy-algorithms",
"url": null
} |
assembly, interpreter, brainfuck
Title: Brainfuck Interpreter written in x86 Assembly Story time: A week ago I found a question about optimizing Assembly code, then I remembered how awesome Brainfuck was, and the match was made very quickly. I decided to write a Brainfuck Interpreter in Assembly!
For this I have used the NASM assembler with x86 Assembly and is intended to run on an Intel CPU and on the Windows OS. I'm sure you can make it run on other combinations if you really want to. I'm also using the Borland 5.5 C Compiler, which is quite old, but the Assembly Book used it and I decided not to deviate from it.
You can compile the code with the following:
nasm -f obj bf-interpreter.asm
bcc32 bf-interpreter.obj | {
"domain": "codereview.stackexchange",
"id": 22929,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "assembly, interpreter, brainfuck",
"url": null
} |
homework-and-exercises, electromagnetism, electric-circuits, electric-current
First circuit: $I_{R_1}=\displaystyle\frac{V}{R_1}$ no matter how many resistors one applies in parallel to $R_1$. The reading of an ammeter in its branch changes only if one changes $V$ and/or $R_1$.
Second circuit: But as soon as one applies resistance in series, it doesn't hold as follows
$$I=\frac{V}{R_A+\displaystyle\frac1{\displaystyle\frac1{R_1}+\displaystyle\frac1{R_2}}}\Rightarrow R_2\uparrow\Rightarrow I\downarrow$$
$$I_{R_1}=\frac{V}{R_A+\displaystyle\frac1{\displaystyle\frac1{R_1}+\displaystyle\frac1{R_2}}}\frac{R_2}{R_1+R_2}=\frac{V}{R_A\left(1+\displaystyle\frac{R_1}{R_2}\right)+R_1}\Rightarrow R_2\uparrow\Rightarrow I_{R_1}\uparrow$$ | {
"domain": "physics.stackexchange",
"id": 69036,
"lm_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, electromagnetism, electric-circuits, electric-current",
"url": null
} |
Cauchy-Condensation Test: If the terms of a series $$\sum_{n=1}^{\infty} a_n$$ are nonnegative and decreasing monotonically to zero, then the series converges if and only if the related series $$\sum_{k=1}^{\infty} 2^k a_{2^k}$$ converges. So in your case, we need only check the convergence of
$$\sum_{k=1}^{\infty} 2^k \frac{\ln(2^k)}{2^k}$$
But notice that
$$\sum_{k=1}^{\infty} 2^k \frac{\ln(2^k)}{2^k} = \sum_{k=1}^{\infty} k \ln(2)$$
From here I hope it's easy to see that this series diverges. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305328688783,
"lm_q1q2_score": 0.800582354835639,
"lm_q2_score": 0.8311430415844385,
"openwebmath_perplexity": 244.04304246250214,
"openwebmath_score": 0.9181938171386719,
"tags": null,
"url": "https://math.stackexchange.com/questions/3333430/is-my-analysis-of-the-series-sum-n-1-infty-frac-ln-nn-correct/3333434"
} |
recommender-system, apache-spark, scala
at scala.collection.mutable.HashMap$$anon$1$$anonfun$foreach$2.apply(HashMap.scala:134)
at scala.collection.mutable.HashMap$$anon$1$$anonfun$foreach$2.apply(HashMap.scala:134)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:236)
at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap$$anon$1.foreach(HashMap.scala:134)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
at org.apache.spark.util.FieldAccessFinder$$anon$3.visitMethodInsn(ClosureCleaner.scala:432)
at org.apache.xbean.asm5.ClassReader.a(Unknown Source)
at org.apache.xbean.asm5.ClassReader.b(Unknown Source)
at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
at org.apache.xbean.asm5.ClassReader.accept(Unknown Source)
at org.apache.spark.util.ClosureCleaner$$anonfun$org$apache$spark$util$ClosureCleaner$$clean$14.apply(ClosureCleaner.scala:262) | {
"domain": "datascience.stackexchange",
"id": 11381,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "recommender-system, apache-spark, scala",
"url": null
} |
general-relativity, linear-algebra, dirac-matrices, clifford-algebra
$$ \cos(\Delta \phi) = \frac{g_{12}}{\sqrt{g_{11}} \sqrt{g_{22}}} $$
where the magnitude of the RHS is less than 1 by the Cauchy-Schwarz inequality. Note that the "arbitrary" metric under consideration still must be positive-definite if $\sigma_i$ are to provide a representation, so the C-S inequality must hold.
Note that when you extend this to 3d by including $\sigma_z$, the matrix representations involved will still be 2x2, but $g_{ij}$ will be 3x3. Good luck!
But again, using matrix representations is not in the spirit of geometric algebra --- for most purposes it's better to just use the formal rules and geometric interpretations. | {
"domain": "physics.stackexchange",
"id": 62622,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, linear-algebra, dirac-matrices, clifford-algebra",
"url": null
} |
ros, sensor-msgs#image
Originally posted by Zorcs on ROS Answers with karma: 16 on 2017-04-13
Post score: 0
Well, since I had checked the API-for-image-sensor_msgs-transport-in-ROS-based-on-C++/Python, I have to acknowledged that there's no way to make this come true besides deal the source image with OpenCV (which called OpenCVImages in ROS) . So anyway, before you try to do this, you have to import your OpenCV-tool in your project (for me, just need OpenCV-for-Android). And, just as the API suggested, we need the cv_bridge as a node to transform the OpenCVImages into ROS-image-messages. Fortunately, I found this android_cv_bridge can be the best solution to solve my problem. In addition, it's really an available way to try this in JNI-way, cause it' not complicated in original-C++/Python-coding. So, guys if you're new to this, you really should take a glimpse of these good suggestions.
(PS: Still hoping for good suggestions in JNI-way.) | {
"domain": "robotics.stackexchange",
"id": 27592,
"lm_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, sensor-msgs#image",
"url": null
} |
ros, subscribe, topic, message-filters
/home/blizzard/ROS/caching_example/src/test.cpp:17:59: instantiated from here
/opt/ros/fuerte/include/message_filters/cache.h:146:70: error: ‘value’ is not a member of ‘ros::message_traits::TimeStamp<std_msgs::Int16_<std::allocator<void> >, void>’
/opt/ros/fuerte/include/message_filters/cache.h:330:5: instantiated from ‘void message_filters::Cache<M>::callback(const EventType&) [with M = std_msgs::Int16_<std::allocator<void> >, message_filters::Cache<M>::EventType = ros::MessageEvent<const std_msgs::Int16_<std::allocator<void> > >]’
/opt/ros/fuerte/include/message_filters/cache.h:92:5: instantiated from ‘void message_filters::Cache<M>::connectInput(F&) [with F = message_filters::Subscriber<std_msgs::Int16_<std::allocator<void> > >, M = std_msgs::Int16_<std::allocator<void> >]’ | {
"domain": "robotics.stackexchange",
"id": 10983,
"lm_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, subscribe, topic, message-filters",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.