text stringlengths 1 1.11k | source dict |
|---|---|
vba, pointers, reflection, rubberduck, com
Private Function TryGetTypeInfo(ByVal typeLib As TypeLibInfo, ByVal moduleName As String, ByRef outTI As TypeInfo) As Boolean
On Error Resume Next
Set outTI = typeLib.GetTypeInfo(moduleName)
TryGetTypeInfo = Err.Number = 0
On Error GoTo 0
End Function
... which references a class for doing the iteration over the doubly linked list of VBETypeLibObj:
Class TypeLibIterator
'@Folder "TypeInfoInvoker"
Option Explicit
Private Type TIterator
currentTL As VBETypeLibObj
pCurrentTL As LongPtr
End Type
Private this As TIterator
Public Property Let baseTypeLib(ByVal rawptr As LongPtr)
currentTL = rawptr
ResetIteration
End Property
Private Property Let currentTL(ByVal rawptr As LongPtr)
this.pCurrentTL = rawptr
CopyMemory this.currentTL, ByVal rawptr, LenB(this.currentTL)
End Property
Public Sub ResetIteration()
Do While this.currentTL.Prev <> 0
currentTL = this.currentTL.Prev
Loop
End Sub | {
"domain": "codereview.stackexchange",
"id": 44341,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, pointers, reflection, rubberduck, com",
"url": null
} |
feature-selection, pca, missing-data, data-imputation
First drop the features with too many missing data (what is too many is up to you to find)
Then impute the missing values using whatever method you want (you mentioned KNN but even simpler methods like mean or mode or constant might work while taking a lot less time)
Finally do the PCA (or any other method of feature selection or dimensionality reduction, since you mentioned in the comments that you wanted to drop features, not dimensionality reduction) | {
"domain": "datascience.stackexchange",
"id": 11277,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "feature-selection, pca, missing-data, data-imputation",
"url": null
} |
brushless-motor, servomotor
Torque ripple is unlikely to be a problem, of course it depends on your application. More advanced commutation methods (sinusoidal or flux vector) essentially eliminate torque ripple.
You say that your application is low speed, but you are also using a 131:1 gearbox. What RPM does the motor normally see? Its not really a low speed application if the motor is running at 30%+ of its rated RPM. Even hall sensors are very high resolution after going through that much reduction so you might not really need low speed performance at the motor itself.
IMHO Given that your current system has significant backlash between the sensor and the motors, I can't imagine a brushless system doing any worse even with halls/trapezoidal commutation. | {
"domain": "robotics.stackexchange",
"id": 102,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "brushless-motor, servomotor",
"url": null
} |
waves, velocity, superposition, phase-velocity
Why this definition of velocity? Why did we just divide the factors of x and t and call that as velocity? For a single sine wave, I understand how we can find the displacement of a maxima or minima and see how much it moves in some time t and define that as velocity (just like mentioned here). But is there any similar treatment possible for this?
How did we identify which one was the group and which one was the phase velocity? Also, it is not very intuitive at first site for a person who didn't know this before that there are actually 2 velocities embodied in such a solution? | {
"domain": "physics.stackexchange",
"id": 65655,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves, velocity, superposition, phase-velocity",
"url": null
} |
javascript, strings
? lang_defs[i].replace
: '<' + lang_defs[i].replace.tag +
' class="' + lang_defs[i]['class'] + '">' +
lang_defs[i].replace.text +
'</' + lang_defs[i].replace.tag + '>'
);
}
else
{
html += element.childNodes[j].outerHTML;
}
}
element.innerHTML = html;
if('function' === typeof lang_defs[i].patch)
{
var returned = lang_defs[i].patch.call( element );
if('string' === typeof returned)
{
element.innerHTML = returned;
}
}
}
}; | {
"domain": "codereview.stackexchange",
"id": 13642,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, strings",
"url": null
} |
electromagnetism, maxwell-equations
My question is regarding the usage of Faraday's law, since there is a changing magnetic field, an electric current will be induced within the circle, this current however also induces its own magnetic field which opposes the change in the external field.
Most applications of Faraday's law that I have seen do not factor in this induced field with computing the total magnetic flux through the loop, in fact they neglect it. Why exactly do we neglect this induced field when computing the flux through the loop? | {
"domain": "physics.stackexchange",
"id": 71634,
"lm_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, maxwell-equations",
"url": null
} |
Thanks! Do you mean that any topology that can make a norm continuous will also make addition and scalar product continuous? – Tim Jan 5 '12 at 23:18
@Tim No, that is not true. In fact, as t.b. pointed out in chat, the weird topology described by me and Bill under Bill's answer, that should not have this property (although I haven't checked the details myself). What I mean is that if you take the respective "standard" topologies, then the addition and scalar multiplication maps are continuous. In fact, you should think of this as saying that the norm is defined in a way to be "compatible" with these operations. – Srivatsan Jan 5 '12 at 23:21 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357205793903,
"lm_q1q2_score": 0.8363924960948451,
"lm_q2_score": 0.8519528000888386,
"openwebmath_perplexity": 203.74507617729844,
"openwebmath_score": 0.9776481986045837,
"tags": null,
"url": "http://math.stackexchange.com/questions/96746/is-a-norm-a-continuous-function?answertab=active"
} |
botany, reproduction, plant-physiology, seeds, germination
Title: Confusion regarding seedless grape and the normal process of germination In general, does seedless grape by definition contains seed or is the seed small enough that the process of ingestion creates the illusion that there is no seed?
If the latter is true, is the seedless grape capable of germination?
Lastly does the fruit part of the seeded grape function as an incentive for animals to ingest it and provide nutrients for seeds in the form of feces, or can it function as nutrient itself?
Thanks The seedless grape technically has a seed, but the seed has no hard outer shell and is microscopic/invisible. These seeds aren't viable. Technically you could isolate out the seed tissue from the grape and grow it in specialized germination medium, but that process also works for any other part of the grape plant. Hooray cuttings! Certainly the seedless grape would not grow if you put it in the ground. | {
"domain": "biology.stackexchange",
"id": 2406,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "botany, reproduction, plant-physiology, seeds, germination",
"url": null
} |
performance, r
859965 567383 262383 19263 292267 669954 222631 865718 744915 326296 344562 783673 539245 436250 690225 795125 898847 291740 875210
930073 809653 258753 168526 294396 757218 316524 612310 274477 893636 129957 934066 512775 539139 189019 146186 477834 302953 620655
133762 250270 788392 833588 760946 101207 610591 726121 834131 926696 321708 466277 379133 953584 528395 790503 648973 347518 603546
277757 510165 47850 979389 193717 238359 262263 139203 14287 70566 473391 228220 975844 783466 277047 568291 331198 652284 201120
388306 205307 563407 329662 239544 848887 982113 117889 800065 63670 72895 965516 302481 439157 595678 656517 347904 248339 787059
700220 787740 812873 37917 591792 675882 97672 872608 421604 628763 925780 549758 71860 387410 283854 106545 421981 419242 245629 | {
"domain": "codereview.stackexchange",
"id": 35824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, r",
"url": null
} |
quantum-mechanics, quantum-field-theory, fourier-transform, second-quantization
Title: A Naive Question of Canonical Quantization A Real Scalar Field When we use canonical quantization method to quantize a free real scalar field in Schrodinger Picture.
The free real scalar Lagrangian is
$$\mathcal{L} = \frac{1}{2}\partial_\mu\phi\partial^\mu\phi - \frac{1}{2}m^2\phi^2$$
The EOM derived from this Lagrangian is
\begin{align}
(\partial_\mu\partial^{\mu} + m^2)\phi = 0
\end{align}
If we do the Fourier transform from $\phi(\vec{x}, t)$ to $\phi(\vec{p}, t)$ as
\begin{align}
\phi(\vec{p}, t) = \int \mathrm{d}^3\vec{x} \phi(\vec{x}, t)e^{-i \vec{p}\cdot\vec{x}}\\
\phi(\vec{x}, t) = \int \frac{\mathrm{d}^3\vec{p}}{(2\pi)^3} \phi(\vec{p}, t)e^{i \vec{p}\cdot\vec{x}}
\end{align}
Then the EOM in momentum space is written as
$$\left[ \frac{\partial^2}{\partial t^2} + (\vec{p}^2 + m^2) \right]\phi(\vec{p}, t) = 0 $$
Thus, for each value of $\vec{p}$, $\phi(\vec{p}, t)$solves this equation simple harmonic oscillator vibrating at frequency: | {
"domain": "physics.stackexchange",
"id": 67474,
"lm_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, quantum-field-theory, fourier-transform, second-quantization",
"url": null
} |
python, exception
Title: Is it a good practice to put an exception handler in every method? I always add an exception handler when a new method is created, and I don't know if it is a good or bad practice. I thought it may be a bit of an annoyance when viewing the source code.
Is it a good practice to put logging functions in the exception block?
def insert_new_camera(self, camera, records, file_hdlr):
try:
pass
except BaseException as e:
traceback.print_exc(file=sys.stdout)
raise e Don't do that.
If you log your exceptions at every function, you'll print the same exception over and over and over again. Its only useful the first time, after that its a pain.
It will also make your code much harder to read and write. | {
"domain": "codereview.stackexchange",
"id": 6113,
"lm_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, exception",
"url": null
} |
ros, callback, spinonce, spinning
to
int i=0;
while(i<50)
{
// %Tag(SUBSCRIBER)%
ros::Subscriber sub = n.subscribe("chatter", 1000, chatterCallback);
// %EndTag(SUBSCRIBER)%
/**
* ros::spin() will enter a loop, pumping callbacks. With this version, all
* callbacks will be called from within this thread (the main one). ros::spin()
* will exit when Ctrl-C is pressed, or the node is shutdown by the master.
*/
i++;
// %Tag(SPIN)%
ros::spinOnce();
}
// %EndTag(SPIN)%
So this should print out "hello world xyz" 50 times right? However, it is not printing anything. As soon as I run this, the program runs as if there were no subscription and callback.
The callback function is the same as the one in the tutorial. No change there.
What then am I doing wrong regarding the spinning? Any help is greatly appreciated.
Thanks!
Originally posted by Nishant on ROS Answers with karma: 143 on 2012-07-06
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 10076,
"lm_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, callback, spinonce, spinning",
"url": null
} |
beginner, c, homework
Removing pointers
You've said the goal was to remove pointers from your struct, but you're still using one for the name field. Why? You could make it a fixed-length array if you truly want to remove all use of pointers. You'll need to ensure that you don't copy anything too long into it, in that case, though. You could define a constant for the maximum length of a name in that case. Something like this:
const size_t kMaxNameBytes = 32; // Maximum number of bytes including NUL terminator | {
"domain": "codereview.stackexchange",
"id": 28820,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, c, homework",
"url": null
} |
gravity, special-relativity, mass
But for a linear mass but with some other shape (say in the shape of a U), it gets more complicated. Say its moving along the $x$-directions, then its length along $x$ will decrease but its length along $y$ and $z$ will stay the same. So the total length might change in some complicated way. Other issues in higher dimensions is that the Lorentz factor for the mass will use the total velocity while the Lorentz factor for length along each direction will use the velocity along that direction. I have no idea how to do the calculation for a rotating body. A rotating sphere would be a really interesting calculation to do. | {
"domain": "physics.stackexchange",
"id": 6223,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, special-relativity, mass",
"url": null
} |
navigation, mapping, map-server, load
Originally posted by sudhanshu_mittal with karma: 311 on 2015-06-11
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by sealguy77 on 2015-06-12:
Thanks. I originally tried this method, but was not successful. I had not gone back to try it after correcting my .yaml file. | {
"domain": "robotics.stackexchange",
"id": 21892,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, mapping, map-server, load",
"url": null
} |
Also do the General Triangle Word Problems practice. Typically with madlibs, you create the paragraph by choosing parts of speech before you even know the story. 8-3 Geometrically Defined Vectors and Applications. Solving for an angle with the law of sines. Apply the Law of Sines to find c. This method will allow you to solve for triangles where you have either SAS or SSS. RMAT Online only 30 multiple choice questions. Consider the following problem, in which we have two angles and the side opposite one of them: A = 35 o, B = 49 o, and a = 7. The sine of a certain angle is 0. Worksheets are Law of sines work, Find each measurement round your answers to the, Law of sinescosines word problems, Law of sineslaw of cosines word problems, Law of sineslaw of cosines work, Find each measurement round your answers to the, Law of sines work, Law of sines law of cosines. The sum of any two sides is greater than the third side B. 2 we discussed isometric transformations and non-isometric | {
"domain": "otticamuti.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771774699747,
"lm_q1q2_score": 0.8044528059651472,
"lm_q2_score": 0.8152324803738429,
"openwebmath_perplexity": 909.6973263622766,
"openwebmath_score": 0.5671159029006958,
"tags": null,
"url": "http://nxyy.otticamuti.it/law-of-sines-and-cosines-multiple-choice-test-pdf.html"
} |
soft-question, machine-learning, linear-algebra, db.databases
The current spurt of theoretical analysis of the semiring model of data aggregation was kick-started in 2007, in the context of provenance. Provenance is a fancy term for annotating data. Since any database tuple can be seen as annotations applied to some unique tuple identifier, aggregation of data can be seen as just combination of annotations. Provenance is therefore a generalization of the idea of aggregating data, and it has explicitly been argued that the right theoretical model of combining annotations is a semiring. The most general semiring, of provenance polynomials, actually allows one to keep track of the entire history of how a piece of data was obtained from constituent parts. As an example, a p-value in the analysis of a clinical trial can keep track of how it was calculated from each of the individual trial results. If some of them turn out to be wrong (or fake) then one can simply recalculate without the bad data. | {
"domain": "cstheory.stackexchange",
"id": 1901,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "soft-question, machine-learning, linear-algebra, db.databases",
"url": null
} |
type-theory
$\lambda\underline{\omega}$ is the simplest extension of the simply typed $\lambda$-calculus allowing type-level computation. Note that $\lambda\underline{\omega}$ doesn't have parametric polymorphism or
type dependency. One way of thinking about $\lambda\underline{\omega}$ is that type-level computation is carried out by having another $\lambda$-calculus, but this time at the type level.
You can think of type-level computation as being run at 'compile time'.
Why use a typed language to run type-level computation? Why not use the untyped $\lambda$-calculus at the type level? Because the things that could go wrong at the term level with untyped terms (e.g. ill-formed programs like $3 + hello$) could now go wrong at the type level (e.g. $\mathbb{B}\; Pair$). So $\lambda\underline{\omega}$ needs a way of preventing ill-formed type-level computation. | {
"domain": "cstheory.stackexchange",
"id": 3251,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "type-theory",
"url": null
} |
ros, 3rd-party-package
Title: different packages same topics
Hi every one, I am new to ROS and Masters student.
We have two packages in the same work space. I want to use a subscriber node in Package1 to a subscribe to a topic published by a node in Package2.
Actually we are doing work on DJI done. DJI has provided their SDK. We want to simulate our algorithms on Matlab and create a package for our algorithm using matlab coder. Then we want to combine matlab coder generated nodes with the nodes provided by DJI SDK. Is it possible.?
We are considering matlab algorithm as Package1 and DJI SDK as Package 2. So matlab package node would subscribe to DJI SDK nodes to get data and process this data. So is it possible..?
Originally posted by UsmanArif on ROS Answers with karma: 41 on 2016-07-28
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 25380,
"lm_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, 3rd-party-package",
"url": null
} |
ros2, roslaunch
Generally, I'd recommend following the Python style guide, PEP 8, when writing your launch files.
Originally posted by jacobperron with karma: 1870 on 2020-02-27
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 34507,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2, roslaunch",
"url": null
} |
ros, ros2, tf2-ros
#13 0x0000007fb722843c in ?? () from /opt/ros/rolling/lib/libtf2_ros.so
#14 0x0000007fb772dc2c in ?? () from /lib/aarch64-linux-gnu/libstdc++.so.6
#15 0x0000007fb73d04fc in start_thread (arg=0x7fffffb98f) at pthread_create.c:477
#16 0x0000007fb759d67c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78 | {
"domain": "robotics.stackexchange",
"id": 36159,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, tf2-ros",
"url": null
} |
ros, rospy, service
Title: Why is this simple service not returning anything?
Hi,
I am new to ROS and have a little problem regarding services.
Right now I am sending a request to the server, triggering the handle_speech function.
In this function I subscribe to the pocketsphinx recognizer/output node.
When I return an integer value from here, the client receives it and shows it to me.
But when I return a value from the speechCB callback function, the client shows nothing.
What am I doing wrong here?
Edit: Now it is working, but this code is not my best coding ;)
#!/usr/bin/env python
import roslib; roslib.load_manifest('kmr01')
from kmr01.srv import *
import rospy
from std_msgs.msg import String
command = 0
def handle_speech(req):
print "handling speech input"
rospy.Subscriber('recognizer/output', String, speechCb)
r = rospy.Rate(10.0)
while not rospy.is_shutdown():
r.sleep()
print "sleeping"
if command != 0:
return RecognizeSpeechResponse(command) | {
"domain": "robotics.stackexchange",
"id": 7686,
"lm_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, rospy, service",
"url": null
} |
In fact, in her case, this is so for a subtle reason: because her function is not tail-recursive, the allocated memory for partial lists she constructs can not be claimed by the garbage-collector, because it is referenced from the function calls (expressions) on expression (call) stack. This leads to a memory exhaustion faster than to a stack blowing, so kernel quits for the lack of memory rather than crashes (don't know which is worse). Anyways, your code is better in this respect, but still sub-optimal performance for this type of data, so, sorry, no upvote this time. But, please do keep it! – Leonid Shifrin Jun 18 '12 at 15:21
I am still developing my feel for efficient programs, so it helps to look at other implementations even if they are not the fastest possible. Leonid's commentary also adds value to your answer. +1 – Michael Wijaya Jun 18 '12 at 18:06
@MichaelWijaya then let's keep this going :). I just edited – Rojo Jun 18 '12 at 18:55 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9273632976542185,
"lm_q1q2_score": 0.8297949086901927,
"lm_q2_score": 0.894789464699728,
"openwebmath_perplexity": 3537.465825469592,
"openwebmath_score": 0.20916207134723663,
"tags": null,
"url": "http://mathematica.stackexchange.com/questions/6931/implementing-a-function-which-generalizes-the-merging-step-in-merge-sort?answertab=active"
} |
quantum-field-theory, lagrangian-formalism, renormalization, propagator, effective-field-theory
How does (12.7) define a propagator?
How does one construct Feynman rules from this procedure? I cannot see how they obtained the Feynman diagrams that they did (or why we would even want them in the first place).
How does one use Wick's theorem to integrate out the high momentum modes? The answer to this question can be found in the note on statistical field theory by Tong that I gave in my comment above, but in case you are interested, I will put it on this site as an answer as well. For details, please refer to the link for specific examples of calculations.
Let us start from eq.(12.5):
$$Z = \int \mathcal{D}\phi e^{-\int \mathcal{L}(\phi)} \int \mathcal{D} \hat{\phi} e^{-\int \mathcal{L}_0(\hat\phi)-\int \mathcal{L}_{\mathrm{int}}(\phi,\hat\phi)}. $$
$$\mathcal{L}_0(\hat\phi)=\frac{1}{2}(\partial_\mu \hat{\phi})^2 + \frac{1}{2} m^2\hat{\phi}^2 $$ | {
"domain": "physics.stackexchange",
"id": 94450,
"lm_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, lagrangian-formalism, renormalization, propagator, effective-field-theory",
"url": null
} |
c#, object-oriented, interface, rubberduck
stopwatch.Stop();
return stopwatch.ElapsedMilliseconds;
}
}
WordApp:
[ComVisible(false)]
public class WordApp : IHostApplication
{
Word.Application _application;
public WordApp()
{
_application = (Word.Application)Marshal.GetActiveObject("Word.Application");
}
~WordApp()
{
Marshal.ReleaseComObject(_application);
}
public void Run(string target)
{
_application.Run(target);
} | {
"domain": "codereview.stackexchange",
"id": 22026,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, object-oriented, interface, rubberduck",
"url": null
} |
Updated: December 5, 2020 — 2:38 PM | {
"domain": "nileshverma.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974434783107032,
"lm_q1q2_score": 0.833971126766946,
"lm_q2_score": 0.8558511469672594,
"openwebmath_perplexity": 1819.831100204488,
"openwebmath_score": 0.7321859002113342,
"tags": null,
"url": "https://nileshverma.com/midterm-ekdpfnh/page.php?ae5d50=covariance-of-beta-0-hat-and-beta-1-hat-proof"
} |
java, game
Yeah... Don't do that. Instead:
Start with an array [0,1,2,3,4,5,6,7,8,9]
Shuffle the array
Shrink the array to the correct size.
That'll be easier to follow
return zahl;
}
// Below function is copy pasted! :O (yes I am ashamed for it, but it's "only" a niche-feature, so yeah :/)
Nothing wrong with copy-pasting. You should take advantage of code that other people wrote as much as possible. The problem with copy-paste is multiple copies of the same code in your program, not taking working code from elsewhere.
private static String ordinal(int i) {
String[] sufixes = new String[] { "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th" };
switch (i % 100) {
case 11:
case 12:
case 13:
return i + "th";
default:
return i + sufixes[i % 10];
}
}
// Above function is copy pasted! :O | {
"domain": "codereview.stackexchange",
"id": 1552,
"lm_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, game",
"url": null
} |
Idea for Claim 1. If $A\lhd {\mathfrak G}$ is a meet-irreducible normal subgroup of finite index, then it has a unique cover $A^*$ in the normal subgroup lattice. Call the covering $A\prec A^*$ centralized if $[{\mathfrak G},A^*]\subseteq A$, else noncentralized. The proof is based on two observations:
(i) If $K\subseteq A\prec A^*$ are normal subgroups of finite index in $\mathfrak G$, where $A$ is meet-irreducible and $A\prec A^*$ is noncentralized, then there is an ultrafilter $u$ such that $N_u\subseteq A$.
(ii) If $L$ is a normal subgroup of $\mathfrak G$ that is contained in every normal subgroup $A\lhd {\mathfrak G}$ where: $K\subseteq A\prec A^*$, $A$ is meet-irreducible, $A\prec A^*$ is noncentralized, then there is a $k$ such that $\Gamma^k(L)\subseteq K$. | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474885320983,
"lm_q1q2_score": 0.811159419281226,
"lm_q2_score": 0.8198933425148214,
"openwebmath_perplexity": 78.27229160401565,
"openwebmath_score": 0.9574775695800781,
"tags": null,
"url": "https://mathoverflow.net/questions/208927/finite-quotients-of-an-infinite-product-of-finite-groups"
} |
-
When representing real numbers in base notation, you should also consider the case of an infinite trailing string of 1s (or 2s in in the ternary case), although there are only a countable number of such cases and it won't affect the result. Why do you need to show that f is continuous? I think your argument is pretty convincing already. – Dan Brumleve Sep 14 '11 at 2:56
Maybe this related thread is helpful. – t.b. Sep 14 '11 at 3:10
@Dan: Thanks for your response. Well, I am to show first that $f$ is continuous and surjective and then conclude that $\mathcal{C}$ is uncountable. – Kuku Sep 14 '11 at 3:13
Kuku, it seems to me that showing f is a surjection is enough to establish that the Cantor set is uncountable. – Dan Brumleve Sep 14 '11 at 3:19 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631655203046,
"lm_q1q2_score": 0.8719837858940576,
"lm_q2_score": 0.8840392832736084,
"openwebmath_perplexity": 124.76060253792599,
"openwebmath_score": 0.9426350593566895,
"tags": null,
"url": "http://math.stackexchange.com/questions/64354/uncountability-of-the-cantor-set?answertab=active"
} |
ros2
Originally posted by joesherman with karma: 66 on 2021-11-22
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 36961,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2",
"url": null
} |
astrophysics, universe
What's more, our models now include the "cosmological principle" that treats the universe as homogeneous, but that's just the universe we can see. We have good evidence that it extends way beyond what we can see, so we have no way to know (or even to expect) that the homogeneity is a truly global property of the entire universe (i.e., not just the "observable" universe). On scales we cannot probe, the structure might be fractal, meaning that there could be pockets somewhere doing very different things, and there might always be stars forming somewhere. Another possibility is that there could be a "landscape" of universes, which is hard to say if they count as the same universe or completely different ones, but it does mean there could be in existence hydrogen elsewhere in the "landscape" even after our universe has none. So it's a tricky question to answer if "all the hydrogen" will eventually be processed, but I suppose you could look at all the hydrogen in the observable universe-- | {
"domain": "astronomy.stackexchange",
"id": 3591,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrophysics, universe",
"url": null
} |
java, swing, io, gui
// Write to file without overwriting current contents
final PrintWriter output = new PrintWriter(new FileWriter(file, true));
output.println("\n" + sdf.format(cal.getTime())); // Add date to file
// Create Frame
JFrame frame = new Workout();
frame.setTitle("My Workout Tracker");
/* Commented out for CR
frame.setIconImage(new ImageIcon("Images/Muscle.png").getImage()); */
// workout, set, and rep fields for data
final JTextField[] workouts = {
new JTextField("Push ups"),
new JTextField("Dumbell Presses"),
new JTextField("Dumbell Curls")
};
final JTextField[] sets = new JTextField[3];
final JTextField[] reps = new JTextField[3]; | {
"domain": "codereview.stackexchange",
"id": 11923,
"lm_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, io, gui",
"url": null
} |
c#, networking
for (var i = 0; i < instances.Count; i++) {
Console.WriteLine(i + ": " + instances[i]);
}
var choice = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Selected network interface:\n" + instances[choice] + "\n\n");
while (true) {
var stats = Utilities.GetNetworkStatistics(instances[choice]);
Console.WriteLine("Download speed: " + stats.DownloadSpeed + " KBytes/s");
Console.WriteLine("Upload speed: " + stats.UploadSpeed + " KBytes/s");
Console.WriteLine("--------------------------------------------------------------\n\n");
Thread.Sleep(1000);
}
}
} | {
"domain": "codereview.stackexchange",
"id": 5103,
"lm_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#, networking",
"url": null
} |
python, python-3.x, random, dice
Your docstrings aren't accurate, for example:
class Die(object):
"""
The Die class represents a sided die
with n amount of sides. ...
but there is no n in the code! Also, note that per the guidelines:
Multi-line docstrings consist of a summary line just like a one-line
docstring, followed by a blank line, followed by a more elaborate
description.
.select_side() seems like an odd name for the method - typically, this would be named .roll(), as that's what you do with a Die!
You have some minor violations of the style guide, for example:
Avoid extraneous whitespace in the following situations:
...
More than one space around an assignment (or other) operator to align it with another.
and yet:
self.dice_sides = dice_sides
self._choosing_data = []
if type(value) == int:
is not the correct way to test whether value is an integer, for two reasons: | {
"domain": "codereview.stackexchange",
"id": 14145,
"lm_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, random, dice",
"url": null
} |
magnetic-fields, electric-current, superconductivity
Here are some links related to this topic:
Toy train Video
Paper on HTS (High Temperature Superconducting) Maglev train
I still can't put this in a comment, so if the admins could move this into a comment that's fine. | {
"domain": "physics.stackexchange",
"id": 21887,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "magnetic-fields, electric-current, superconductivity",
"url": null
} |
entanglement, measurement, quantum-state
$$
where the eigenvalues $\lambda_m$ are all distinct since $M$ is assumed to be non-degenerate. From the measurement postulate, the post-measurement state $\sigma_m$ is
$$
\begin{align}
\sigma_m&\sim(|\psi_m\rangle\langle\psi_m|\otimes I)\rho(|\psi_m\rangle\langle\psi_m|\otimes I)\\
&=|\psi_m\rangle\langle\psi_m|\otimes\langle\psi_m|\rho|\psi_m\rangle
\end{align}\tag2
$$
where $\sim$ means that the operator on the left hand side is a scalar multiple of the operator on the right hand side. The post-measurement state is pure if and only if $\mathrm{rank}(\sigma_m)=1$. Substituting from $(2)$, we have
$$
\begin{align}
\mathrm{rank}(\sigma_m)&=\mathrm{rank}(|\psi_m\rangle\langle\psi_m|\otimes\langle\psi_m|\rho|\psi_m\rangle)\\
&=\mathrm{rank}(|\psi_m\rangle\langle\psi_m|)\,\mathrm{rank}(\langle\psi_m|\rho|\psi_m\rangle)\\
&=\mathrm{rank}(\langle\psi_m|\rho|\psi_m\rangle)
\end{align}\tag3
$$
so for non-degenerate $M$ the post-measurement state is pure if and only if
$$ | {
"domain": "quantumcomputing.stackexchange",
"id": 4119,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "entanglement, measurement, quantum-state",
"url": null
} |
Collect the coefficients (between parentheses) of this null linear combination : you will get the second of your vectors (presented in a line instead of a column).
For the other one, it is the same :
$$(2)C_1+(0)C_2+(-1)C_3+(1)C_4=0$$
Explanation : Relationship (1) can be written under the form :
$$\underbrace{\left(C_1|C_2|C_3|C_4\right)}_{R}\underbrace{\begin{pmatrix}1\\1\\0\\0\end{pmatrix}}_{V}=\underbrace{\begin{pmatrix}0\\0\\0\\0\end{pmatrix}}_0 \ \ \implies \ \ V \in \ker R$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97112909472487,
"lm_q1q2_score": 0.8437429639793314,
"lm_q2_score": 0.8688267796346599,
"openwebmath_perplexity": 391.88260702392074,
"openwebmath_score": 0.8012675642967224,
"tags": null,
"url": "https://math.stackexchange.com/questions/3383363/describing-the-kernel-of-a-matrix-as-a-span-of-two-vectors"
} |
pytorch, transformer
Training
Both tgt and tgt_mask should be changed to simulate auto-regressive properties.
You are feeding in tgt as the input to the decoder, where tgt is the ground truth target sequence to predict. tgt should have dimension length(sequence) x batchSize x $\|dict\|$. Additionally, you are feeding in mask where the diagonals are -inf.
Instead, you should do the following: | {
"domain": "ai.stackexchange",
"id": 2534,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pytorch, transformer",
"url": null
} |
actuator, linear-bearing
Title: Repairing non-lubricated linear actuator I have a Chinese CNC mill (CNC3020T, though several different devices go under this name), and its Z axis was very imprecise, often being randomly off position by as much as 0.5mm. I've disassembled the linear actuator and discovered several problems with it.
First problem is that they apparently forgot to lubricate the linear ball bearings. I make this conclusion because the rails have a set of grooves ground into them, and after wiping the rails with a tissue the only thing that is left is the finely powdered metal, with no traces of oil or other lubricant.
Second problem is the nut. I expected to see a ballnut, but in reality it is just a piece of threaded PTFE! The leadscrew rotates smoothly in it, but there is quite some lateral movement, i.e. I can tilt it slightly without any opposing force. | {
"domain": "robotics.stackexchange",
"id": 430,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "actuator, linear-bearing",
"url": null
} |
gazebo, urdf, solidworks
Or, why can't I just set the Inertial Origin to 0,0,0 and use the very last set of values from SolidWorks: Ixx, Ixy, Ixz, etc.
Will Gazebo/ODE get confused because the Inertial Origin is not the Center of Mass of the link?
These two posts provided some info, but no complete explanation:
http://answers.ros.org/question/11407/what-is-the-origin-of-the-inertia-tensor-in-urdf/
http://answers.ros.org/question/30539/choosing-the-right-coefficients-for-gazebo/
Thanks. | {
"domain": "robotics.stackexchange",
"id": 10247,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo, urdf, solidworks",
"url": null
} |
c#, winforms, serialization, rubberduck, configuration
return new ToDoMarker[] { note, todo, bug };
}
// omitted some reflection methods for a different set of configs for brevity
}
}
In TodoModel I originally injected just the markers, but it turns out that it needs to be able to serialize the object into XML. So, it now calls the public static ConfigurationLoader and I smell a smell.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Rubberduck.Config;
using System.ComponentModel;
namespace Rubberduck.UI.Settings
{
public class TodoSettingModel
{
private BindingList<ToDoMarker> _markers;
public BindingList<ToDoMarker> Markers { get { return _markers; } }
public TodoSettingModel(List<ToDoMarker> markers)
{
_markers = new BindingList<ToDoMarker>(markers);
} | {
"domain": "codereview.stackexchange",
"id": 11444,
"lm_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#, winforms, serialization, rubberduck, configuration",
"url": null
} |
classical-mechanics, rotational-dynamics, orbital-motion, rotational-kinematics, rigid-body-dynamics
\begin{align}
J \, &\frac{d\vec{\Omega}}{dt} = \big( J\vec{\Omega}\big) \times \vec{\Omega}\\
&\frac{d}{dt} U = U\, \big(\vec{\Omega} \times \cdot \big)
\end{align} Using the conservation laws, which say that the magnitude of $\vec{M} = J\,\vec{\Omega}$ is conserved (because the vector $\vec{m}$ itself is constant in the world frame, so its representation $\vec{M}$ in the body-fixed frame should have a constant length, but not a constant direction) and that the energy is conserved, we arrive at the fact that the solutions of the first set of equations $J \, \frac{d\vec{\Omega}}{dt} = \big( J\vec{\Omega}\big) \times \vec{\Omega}$ always lie on the pair of ellipsoids
\begin{align}
&(J\,\vec{\Omega} \, \cdot \, J\,\vec{\Omega}) = c_1 \,\,\, \text{(conservation of momentum)}\\
&(J\,\vec{\Omega} \, \cdot \, \vec{\Omega}) = c_2 \,\,\, \text{(conservation of energy)}\\ | {
"domain": "physics.stackexchange",
"id": 59894,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, rotational-dynamics, orbital-motion, rotational-kinematics, rigid-body-dynamics",
"url": null
} |
quantum-mechanics, angular-momentum, group-theory, rotation, spinors
$$R_{\phi}=
\begin{pmatrix}
\cos(\phi)&-\sin(\phi)&0\\ \sin(\phi)& \cos(\phi)&0\\ 0&0&1
\end{pmatrix} $$
That is if $\vec{v} \in \mathbb{R}^3$ then the rotation of $\vec{v}$ is simply
$R \vec{v}$.
But what is a 'rotation of a spinor' concretely? How is it described?
For sake of simplicity lets focus on the most common spinor representation
from particle physics: The subgroup $SU(2) \subset SL(2, \mathbb{C})$ provides a simply connected
$2$ to $1$ covering map $f:SU(2) \to SO(3)$ of rotation group. Clearly $SU(2)$
acts as a subgroup of $SL(2, \mathbb{C})$ on complex vector space $\mathbb{C}^2$.
Since in this setting $SU(2)$ provides a spinor representation, we can call
certain vectors of $\mathbb{C}^2$ 'spinors', right?
But what is a rotation of spinors here? Say we take an arbitrary spinor
$s \in \mathbb{C}^2$ and want to perform a 'rotation' around certain axis by
certain fixed degree $\phi$.
Which object in $SU(2)$ represents this so called 'rotation' and why such an operation | {
"domain": "physics.stackexchange",
"id": 71628,
"lm_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, angular-momentum, group-theory, rotation, spinors",
"url": null
} |
These two properties mean that $\phi$ associates an ordered pair $(A,B)$ of the kind we’re examining with another ordered pair that has a different parity. Each of these pairs cancels out its associated pair in terms of evaluating the alternating sum on the left side of the identity we’re trying to prove. Since every pair $(A,B)$ has an associated pair that cancels it out, we have that the right side of our identity is the number of pairs $(A,B)$ for which $\phi$ is not defined. Let’s count those leftover pairs now. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071476888223,
"lm_q1q2_score": 0.8002402117232731,
"lm_q2_score": 0.8056321889812554,
"openwebmath_perplexity": 361.49674010989537,
"openwebmath_score": 0.9256088733673096,
"tags": null,
"url": "https://mikespivey.wordpress.com/2018/08/01/an-alternating-convolution-identity-via-sign-reversing-involutions/"
} |
• also see the literature on Brownian bridges ? – Ben Bolker Jul 25 '18 at 14:45
• @BenBolker: that sounds like a much better idea than mine. Would you be interested in writing up an answer? – Stephan Kolassa Jul 25 '18 at 14:56
• maybe I'll get to it, but anyone else who is reading this should feel free to jump in and write up an answer. I don't mind. – Ben Bolker Jul 25 '18 at 16:36
• (Sorry, of course I mean "BB-BB".) – Stephan Kolassa Jul 25 '18 at 16:40
• Possible duplicate of Generating samples from singular Gaussian distribution – Xi'an Jul 26 '18 at 14:44
We will generate multivariate normals $X\sim MN(\mu, \Sigma)$ with $\mu\in\mathbb{R}^n$ and $\Sigma\in\mathbb{R}^{n\times n}$ such that their sum satisfies our condition. Let $Z=X_1 + \dots + X_n$.
As a common mean, we choose
$$\mu_1 = \dots = \mu_n = \frac{a+b}{2n}.$$
In order that $Z\in[a,b]$ with probability $p$, its standard deviation should fulfill
$$\sigma_Z = \frac{b-a}{q_\alpha},$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668690081643,
"lm_q1q2_score": 0.8089347205714964,
"lm_q2_score": 0.8244619199068831,
"openwebmath_perplexity": 505.47963152124345,
"openwebmath_score": 0.7492968440055847,
"tags": null,
"url": "https://stats.stackexchange.com/questions/358895/generate-identically-distributed-dependent-normal-random-numbers-with-prespecifi"
} |
star, the-moon
Title: Why can we see stars but not astronaut on the moon A question came up today in astronomy class and it got me wondering all night.
How is it that if stars are so far away, we can see them so clearly but we cannot see astronauts on the moon. An astronaut on the moon could only be seen by reflecting the Sun's light towards Earth. Stars on the other hand emit their own light.
To first order, the amount of flux incident upon the Moon from the Sun is the same as that at the Earth - about 1.4 kW/m$^{2}$.
Let us assume that an astronaut is perfectly reflective and that the relevant reflective area that we can see from the Earth is 1 m$^2$. NB: If the astronaut is not lit up by the Sun, then there is obviously no way that they can be seen.
Treating the astronaut on the Moon as an isotropic point source emitter of reflected light, we have a light source of power 1.4 kW at a distance of 400,000 km. The flux at the Earth is therefore $7\times10^{-16}$ W m$^{-2}$. | {
"domain": "astronomy.stackexchange",
"id": 889,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "star, the-moon",
"url": null
} |
complexity-theory, reductions, proof-techniques, np-hard
Try taking $G$ and adding two new vertices $s$ and $t$ and connecting them so that they can start and end such a path $p$ - remember though that you don't know what $p$ is. | {
"domain": "cs.stackexchange",
"id": 18009,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, reductions, proof-techniques, np-hard",
"url": null
} |
example my hypothesis is that Y increase with X, but then I also show that alternative hypotheses Y and Z cannot explain variation in Y, this provides additional support to my original hypothesis. Or if I get roughly the same estimated effect of $$X_1$$, even after controlling for $$X_2$$ and $$X_3$$, it suggests the estimate association between $$X_1$$ and Y is robust to controlling for other variables of interest. | {
"domain": "bookdown.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517450056274,
"lm_q1q2_score": 0.8018981122129847,
"lm_q2_score": 0.8198933403143929,
"openwebmath_perplexity": 431.8432274751122,
"openwebmath_score": 0.5763149261474609,
"tags": null,
"url": "https://bookdown.org/btmarti25/FD2E/comparing-models.html"
} |
If you have a lot of hands to work with as you say, it will be faster to pre-compute a table of binomial coefficients. If you want to get fancy, you can make an inverted list, and locate the appropriate value by a modified binary search. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877028521422,
"lm_q1q2_score": 0.809858807512764,
"lm_q2_score": 0.8244619220634457,
"openwebmath_perplexity": 342.6442392282743,
"openwebmath_score": 0.639323353767395,
"tags": null,
"url": "https://math.stackexchange.com/questions/3709700/numbering-system-for-poker-hands"
} |
algorithms, union-find, connected-components
Title: On the complexity analysis of quick-union in Algorithms by Sedgewick and Wayne I am currently studying Algorithms, Fourth Edition by Sedgewick et al. On page 226, there is an analysis of the quick-union algorithm's find() method's worst case.
This is the algorithm:
private int find(int p)
{ // Find component name.
while (p != id[p]) p = id[p];
return p;
} | {
"domain": "cs.stackexchange",
"id": 16247,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, union-find, connected-components",
"url": null
} |
ros, transforms, laser-scan, transform
As to why that pose subscriber, and the corresponding use_pose parameter are not documented, I don't know. Would be nice if you could update the wiki page to include those.
Originally posted by gvdhoorn with karma: 86574 on 2017-02-12
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 26995,
"lm_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, transforms, laser-scan, transform",
"url": null
} |
finite-impulse-response, poles-zeros, zero-padding, group-delay
Here is my attempt.
a) The transfer function of an FIR filter is given as;
$$
H(z) = \sum\limits_{n=0}^{N}h[n] z^{-n}
$$
where $h[n] \in \mathbb{R} $
From the problem statement it follows that the transfer function of this filter is given as;
$$
H(z) = \sum\limits_{n=7}^{11}h[n] z^{-n} = h[7]z^{-7} + h[8]z^{-8} + h[9]z^{-9} + h[10]z^{-10} + h[11]z^{-11}
$$
Am I correct in saying that the filter length is $N=5$ and that the group delay is $ \frac{N-1}{2} + 7 = 9 $ ? Here, I have used the fact that the first 7 coefficients are zero (i.e. $h[0] = h[1] = \dots = h[6] = 0$) and am assuming that this equates to a constant delay. The fact that the first 7 coefficients are zero is confusing me.
b) I believe that since the the transfer function as follows
$$
H(z) = z^{-11} \big(h[7]z^{4} + h[8]z^{3} + h[9]z^{2} + h[10]z + h[11] \big)
$$
where we have factored out the $z^{-11}$ term, it follows that there must be 4 zeros. | {
"domain": "dsp.stackexchange",
"id": 11679,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "finite-impulse-response, poles-zeros, zero-padding, group-delay",
"url": null
} |
performance, c, unit-testing, cyclomatic-complexity, lexical-analysis
if (log_data->stand_alone)
{
sprintf(buffer,
"\n\tEnd Positive test path current_state = %s input character = %s\n\n",
state_name_for_printing(current_state),
(alphabet == LOWER_CASE) ? "Lower Case" : "Upper case");
log_generic_message(buffer);
}
}
return test_passed;
}
static bool core_non_alpha_character_transition_unit_test(Test_Log_Data* log_data,
Syntax_State current_state, unsigned char* input, State_Transition_Characters expected_transition[],
size_t positive_path_count, char* local_func_name)
{
bool test_passed = true;
char* keep_old_path = log_data->path; | {
"domain": "codereview.stackexchange",
"id": 39203,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, c, unit-testing, cyclomatic-complexity, lexical-analysis",
"url": null
} |
time-complexity, data-structures, arrays, avl-trees
If the key of $u$ is at most $r$, delete $u$ from the tree subtract $1$ from the values $\eta(z)$ of all proper ancestors $z$ of $u$.
Otherwise all rooms between $l$ and $r$ are already occupied.
4) GetOut(r): Insert a new vertex $z$ with key $r$ into the tree with $\eta(z)=1$. Increment by $1$ the values $\eta(z')$ of all the proper ancestors $z'$ of $z$. | {
"domain": "cs.stackexchange",
"id": 16219,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "time-complexity, data-structures, arrays, avl-trees",
"url": null
} |
quantum-computing, interactive-proofs, pspace
In the classical case, I believe alpha-beta pruning is the optimal algorithm, and achieves complexity roughly $\tilde{O}\left(2^{n/2}\right)$. (I'm not certain of this, so confirmation would be appreciated.) Note that this matches the quantum complexity if we don't have an oracle.
Question: What is the quantum complexity of $L$ given an untrusted oracle, where complexity is measured conditional on the oracle being honest? | {
"domain": "cstheory.stackexchange",
"id": 5124,
"lm_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-computing, interactive-proofs, pspace",
"url": null
} |
javascript, game-of-life
return i;
}()),
y = (function(){
return fields < (Math.pow(x, 2) - x) / 2 + 1
? x - 1
: x;
}()); | {
"domain": "codereview.stackexchange",
"id": 4553,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, game-of-life",
"url": null
} |
c, reinventing-the-wheel, assembly, locking
pthread_t tid[2];
int main(void)
{
int i = 0;
int err;
while(i < 2)
{
err = pthread_create(&(tid[i]), NULL, &doSomeThing, i?&err:0);
if (err != 0)
printf("\ncan't create thread :[%s]", strerror(err));
else
printf("\n Thread created successfully\n");
i++;
}
sleep(5);
return 0;
} | {
"domain": "codereview.stackexchange",
"id": 20425,
"lm_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, reinventing-the-wheel, assembly, locking",
"url": null
} |
python, python-3.x, iteration, casting
I'm looking for any feedback on my implementation, and how to make this code more efficient. It seems weird that I have to cast the num to a string, then look at each char, convert it to int, then determine if it's even. Having to cast (int => string => analyzing as char => int) seems unnecessary to me. You should have a look at Loop like a native!. Explicitly iterating over the indices is usually not the best way to do something in Python. By directly iterating over the string representation of n you won't even need the second argument (and you should remove it if the assignment/defined interface would not require it). This will help you a lot later, when you start using generators or other iterables which are not indexable.
In addition, you can use the built-in sum together with the fact that bools are integers with True == 1 and False == 0 and a generator expression to make your function a lot shorter:
def count_even_digits(n, n_digits): | {
"domain": "codereview.stackexchange",
"id": 34615,
"lm_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, iteration, casting",
"url": null
} |
$\hat{\sigma}^2_i = \hat{\alpha} + \hat{\beta} * x_i$ for some $i$
Is there any suggestion as to how to constraint the predicted values to be positive?
Thanks!
• You could regress $\log \sigma_i^2$, and then take the exponential of the prediction. – Arthur B. Nov 14 '14 at 15:24
• I am not quite sure how that would solve the issue: you mean use $log\sigma^2_i)$ as my dependent variable, but keep the explanatory variable without log transformation? – Mayou Nov 14 '14 at 16:04
• yes, I'll write an answer with more details – Arthur B. Nov 14 '14 at 16:14
Transform your dependent variable $\sigma^2$ with a logarithm and fit the following model
$$\log \sigma_i^2 = \alpha + \beta x_i + \epsilon_i$$
Get an estimate of the variance $\eta^2$ of the residuals as
$$\hat{\eta^2} = \frac{1}{N}\sum_{i=1}^N (\log \sigma_i^2 - \alpha - \beta x_i)^2$$
Finally, use the estimator
$$\hat{\sigma_i^2} = \exp\left(\hat{\alpha} + \hat{\beta} x_i + \frac{\hat{\eta^2}}{2}\right)$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692359451417,
"lm_q1q2_score": 0.8117518516404024,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 401.64263879401983,
"openwebmath_score": 0.7824477553367615,
"tags": null,
"url": "https://stats.stackexchange.com/questions/124026/weighted-least-squares-negative-fitted-values"
} |
javascript, jquery, datetime
if you set dateMax already to null, then why would you set dateMax again to null?
Your code dies when the user tries to select an end date without first selecting first a starting date in 30 days mode with Cannot read property 'getFullYear' of null because you are indeed trying to calculate on an empty field..
I am not sure why in 30 day mode the start date is impacted by the end date, especially since clearing out the end date opens up the calendar again.
All in all, I would go with something like this:
$('#startDate, #endDate').datepicker({
beforeShow: setDateRange,
dateFormat: "mm/dd/yy",
firstDay: 1,
changeFirstDay: false,
onChange: function () {
$(this).valid();
}
});
var dateLogic = { | {
"domain": "codereview.stackexchange",
"id": 9873,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, datetime",
"url": null
} |
homework-and-exercises, electromagnetism, quantum-field-theory, lagrangian-formalism, propagator
Title: Derivation of propagator for Proca action in QFT book by A.Zee Without considering gauge invariance, A.Zee derives Green function of electromagnetic field in his famous book, Quantum Field Theory in Nutshell. In chapter I.5, the Proca action would be,
$$S(A) = \int{d^{4}x\,\left\{\frac{1}{2}A_{\mu}\left[(\partial^2+m^2)g^{\mu\nu}-\partial^{\mu}\partial^{\nu}\right]A_{\nu}+A_{\mu}J^{\mu}\right\}},\tag{1}$$
And the inverse of the differential operator in the square bracket would statisfy,
$$\left[(\partial^2+m^2)g^{\mu\nu}-\partial^{\mu}\partial^{\nu}\right]D_{\nu\lambda}(x) = \delta^{\mu}_{\lambda}\delta^{(4)}(x)\tag{2}$$
Using Fourier transform $D_{\nu\lambda}(x) = \int{d^4k/(2\pi)^4D_{\nu\lambda}(k)e^{-ikx}}$ to solve the differential equation, we got the following equation,
$$\left[-\left(k^2-m^2\right)g^{\mu\nu}+k^{\mu}k^{\nu}\right]D_{\nu\lambda}(k) = \delta^{\mu}_{\lambda}$$
Then I expect the solution would be, | {
"domain": "physics.stackexchange",
"id": 99166,
"lm_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, quantum-field-theory, lagrangian-formalism, propagator",
"url": null
} |
homework-and-exercises, newtonian-mechanics, velocity, geometry
Which is equal to:
$$\mathbf v_I = \left[ \begin {array}{c} \cos(\varphi) \:\:\: -\sin(\varphi) \:\:\: 0
\\ \sin(\varphi) \:\:\: \cos(\varphi) \:\:\: 0
\\ 0 \:\:\: 0 \:\:\: 1
\end {array} \right]
\cdot
\left[ \begin {array}{c} v\sin \left( \beta \right) \cos \left( \theta\right)
\\ v\cos \left( \beta \right)
\\ -v\sin \left( \beta \right)\sin \left( \theta \right)
\end {array} \right]
=
\left[ \begin {array}{c} v\sin(\beta)\cos(\theta)\cos(\varphi
) - v\cos(\beta)\sin(\varphi)
\\ v\sin(\beta)\cos(\theta)\sin(\varphi
) + v\cos(\beta)\cos(\varphi)
\\ -v\sin \left( \beta \right)\sin \left( \theta \right)
\end {array} \right]
$$
Assuming the above is correct; what is in this case vv? the components of the velocity vector given in ball system are
$$\mathbf v_B= \left[ \begin {array}{c} v\sin \left( \beta \right)
\\ v\cos \left( \beta \right) \\ 0
\end {array} \right]
$$ | {
"domain": "physics.stackexchange",
"id": 89661,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, velocity, geometry",
"url": null
} |
c#, performance, json.net
// This method will download a tar.gz file from a remote url and save it onto the disk
// in a particular folder
private async Task<bool> DownloadConfigs(string remoteUrl, string fileName)
{
var policyResult = await Policy
.Handle<TaskCanceledException>()
.WaitAndRetryAsync(retryCount: 5, sleepDurationProvider: i => TimeSpan.FromMilliseconds(500))
.ExecuteAndCaptureAsync(async () =>
{
using (var httpResponse = await _httpClient.GetAsync(remoteUrl + fileName).ConfigureAwait(false))
{
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
}
}).ConfigureAwait(false); | {
"domain": "codereview.stackexchange",
"id": 38879,
"lm_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, json.net",
"url": null
} |
• MeshCoordinates[DiscretizeRegion[ri, CoordinateBounds[ri]]] gives all three points.
– kglr
Jun 7, 2021 at 7:14
• With version 12.3 one can do: DiscretizeRegion[ri, CoordinateBounds[ri]] // MeshCoordinates or Solve[{x, y} \[Element] r1 && {x, y} \[Element] r2, {x, y}] // N.
– rmw
Jun 7, 2021 at 8:39
• Version 11.2 give me correct result with same code {{2.95674, 3.87023}, {3.20154, 4.60463}, {3.42285, 5.26855}} Jun 7, 2021 at 8:50
Using the two-argument form of DiscretizeRegion we get three points:
MeshCoordinates[DiscretizeRegion[ri, CoordinateBounds[ri]]]
{{2.95674, 3.87023}, {3.20154, 4.60463}, {3.42285, 5.26855}}
FWIW, we can also use MeshPrimitives to get the three Points:
MeshPrimitives[DiscretizeRegion@ri, 0]
{Point[{2.95674, 3.87023}], Point[{3.20154, 4.60463}], Point[{3.42285, 5.26855}]} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9334308147331957,
"lm_q1q2_score": 0.8126423097200192,
"lm_q2_score": 0.8705972600147106,
"openwebmath_perplexity": 3840.293065368445,
"openwebmath_score": 0.21031039953231812,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/249283/find-intersection-points-between-parametricregion-and-other-curves"
} |
definitions
http://dictionary.reference.com/browse/inverted
I'm curious because of this:
Structurally, the cephalopod eye differs from the vertebrate eye.
Cephalopods do not have a cornea, and the retina is everted so that
the distal end of photoreceptive cells lies directly behind the lens
and points toward incoming light. As a result, photoreceptor cells
connect to the optic nerve behind the retina (Packard 1972).
From: Evolution: Education and Outreach
October 2008, Volume 1, Issue 4, pp 439-447
http://link.springer.com/article/10.1007%2Fs12052-008-0084-1
http://link.springer.com/article/10.1007%2Fs12052-008-0084-1/fulltext.html
via
https://en.wikipedia.org/wiki/Cephalopod#cite_note-Serb2008-12 | {
"domain": "biology.stackexchange",
"id": 2286,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "definitions",
"url": null
} |
condensed-matter, bosons, lattice-model, spin-models, spin-statistics
Title: Why can we choose spin-1/2 degrees of freedom to commute? Edit 2:
The previous title of this question was "Why are qubits bosonic?" Thanks to the answers that have been provided so far, I now realize I asked my question in a sloppy way. The question I would actually like answered is something more like "Why can local spin-1/2 degrees of freedom in condensed matter systems be chosen to commute, in light of the spin-statistics connection?" What follows is the original body of the question.
I have a very simple, probably even trivial question. In the condensed matter literature, I see local qubits referred to as bosonic degrees of freedom. Now, a qubit is a spin-1/2 system (or at least can be realized by or mapped to such a system), and at least in relativistic QM, spin-1/2 particles are fermions. So why are qubits bosonic degrees of freedom? | {
"domain": "physics.stackexchange",
"id": 82403,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "condensed-matter, bosons, lattice-model, spin-models, spin-statistics",
"url": null
} |
python, phylogenetics, phylogeny, sequence-analysis
prot = 'CYCLE'
degenDict = dict()
for v,k in table.items():
if k in degenDict:
degenDict[k].append(v)
else:
degenDict[k]=[]
degenDict[k].append(v)
nucs = [degenDict[resid] for resid in prot]
for degenNuc in product(*nucs):
print(''.join(degenNuc)) | {
"domain": "bioinformatics.stackexchange",
"id": 2233,
"lm_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, phylogenetics, phylogeny, sequence-analysis",
"url": null
} |
DHS algorithm exhibits a lower level of performance. Constrained algorithms: std::ranges::copy, std::ranges::sort, Execution policies (C++17). Memory overhead of O(m+n). Counting sort worst, best and average time complexity is O(n+k), where n is number of elements to sort. …Where each step is either some operation or memory access. Lets begin: This is a sorting problem. This information can be used to place directly into its correct. Counting sort is a sorting technique based on keys between a specific range. Knowing these time complexities will help you to assess if your code will scale. We can see that the time complexity of counting sort is linear and the sort is efficient. It counts the number of elements The algorithm loops over the items, computing a histogram of the number of times each key occurs within the input collection. MERGE SORT: Splitting of array depends on the value of pivot and other array elements: Splitting of array generally done on half: Worst-case time | {
"domain": "associazioneculturart.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102524151827,
"lm_q1q2_score": 0.8298136572034452,
"lm_q2_score": 0.8577681031721325,
"openwebmath_perplexity": 925.4757654217474,
"openwebmath_score": 0.3923802375793457,
"tags": null,
"url": "http://eawi.associazioneculturart.it/counting-sort-time-complexity-analysis.html"
} |
(positive terms) More series practice (positive terms) Alternating series practice; Series dominoes (TACTIVITY) Power series: Introduction to power series and intervals of convergence; Practice finding intervals of convergence; Practice finding Taylor series using the formula and by. 2 (revisited) to 8. 1 2,− 4 3, 9 4,− 16 5, 25 6,… (The formula is {an}={(−1)n+1n2 n+1}). A red color indicates negative voltage. Infinite Sequences and Series This section is intended for all students who study calculus, and considers about \(70$$ typical problems on infinite sequences and series, fully solved step-by-step. If L 1, then the test provides no useful information and another test must be used. Alternating Series Test E. Make your way through each of the practice exercises. At , the series is. AC stands for “Alternating Current,” meaning voltage or current that changes polarity or direction, respectively, over time. While this idea is the one needed most frequently, our students sometimes | {
"domain": "citylinker.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850877244272,
"lm_q1q2_score": 0.8234516931407722,
"lm_q2_score": 0.837619961306541,
"openwebmath_perplexity": 1062.0543476437563,
"openwebmath_score": 0.7435677647590637,
"tags": null,
"url": "http://citylinker.it/tkiz/alternating-series-test-practice-problems.html"
} |
java, parsing, android
At each state, you check whether the input line is valid, and update the Event with data. You know at SYN_MT_REPORT you add the MTEvent to the Event's List and at SYN_REPORT you have read the whole event, so you can add the event to the event list. If the line isn't valid, have it throw a parseException that your main read loop can catch.
Based on the input, you also choose the next state, So, when you're in the SYN_MT_REPORT state, when you next call parseLine, the next command could be a ABS_MT_TOUCH_MAJOR or a SYN_REPORT, so in the nextAction method, the line read will decide between each.
If you read the SYN_REPORT state, you know that you have a complete event, and to add the list of MTEvent in to the current Event
If you read the ABS_MT_TOUCH_MAJOR you know the next state will be ABS_MT_TRACKING_ID for another multi-touch event. | {
"domain": "codereview.stackexchange",
"id": 13654,
"lm_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, parsing, android",
"url": null
} |
of rectangle diagonals. Of RT using this website, you should be able to see why Awasthi. About it so that we will prove here: the diagonals of a rectangle, then the triangles! For example, the two diagonals AC & BD a text best helps the reader determine central... Of any parallelogram bisect each other in half at right angles, it is not a! Take rectangle LMNO and divide along the diagonal MO into two right triangles, in which the bisect... Of rectangle the diagonals of rectangles are a special type of parallelogram in... Pictured on the left the rectangular field then the two diagonals are equal in.! ) AB= CD as they are opposite sides of a rectangle is a are. Engineering and an MBA degree with 4 right angles through 180° ) website, you remember. Pictured on the properties of parallelograms, including congruent opposite sides in a are the two diagonals of a rectangle equal why... Type of parallelogram, so it has two lines of reflectional symmetry rotational. Ncert Exemplar ncert | {
"domain": "rnr.rs",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426405416754,
"lm_q1q2_score": 0.8355027099569897,
"lm_q2_score": 0.8577681049901037,
"openwebmath_perplexity": 923.669590419502,
"openwebmath_score": 0.5019310116767883,
"tags": null,
"url": "http://rnr.rs/eau-de-acpo/e3d36a-are-the-two-diagonals-of-a-rectangle-equal-why"
} |
newtonian-mechanics, forces, reference-frames, torque, moment-of-inertia
$$I\ddot\theta=\sum\tau$$
The correct answer would suggest the moment of inertia is taken with respect to wherever you decide to take your sum of torques from, and then you can do some algebra.
Why do we or do we not need to make the moment of inertia a function of the state of the system, since the state of the system has a varying axis of rotation for the rod? You can easily work in the non-inertial frame where cart is at rest. Then your reference point is not moving, and you just need to include an additional pseudoforce acting at the center the pendulum of $ma$ where $a$ is the acceleration of the system relative to the ground (similar to how we take the gravity force $mg$ to act at the center of a uniform body). See my answer here for more details. | {
"domain": "physics.stackexchange",
"id": 69166,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, forces, reference-frames, torque, moment-of-inertia",
"url": null
} |
beginner, haskell, recursion, interpreter, brainfuck
when (codePos /= (snd . bounds $ cs)) $ case cs ! codePos of
'+' -> updatePos succ
'-' -> updatePos pred
'>' -> updateVal succ
'<' -> updateVal pred
'[' -> branch (== 0) next
']' -> branch (/= 0) prev
'.' -> lift (putStr [chr $ S.index ts tapePos]) >> execNext
',' -> do { c <- lift getChar; let newTape = S.update tapePos (ord c) ts in put (M tapePos newTape nextPos) >> execCode }
_ -> execNext | {
"domain": "codereview.stackexchange",
"id": 10870,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, haskell, recursion, interpreter, brainfuck",
"url": null
} |
homework-and-exercises, special-relativity, energy
The beauty is that this avoids all complications regarding how you did the accelerating -- that's the power of energy methods. | {
"domain": "physics.stackexchange",
"id": 9295,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, special-relativity, energy",
"url": null
} |
# Thread: Values of Angle in Standard Position
1. ## Values of Angle in Standard Position
I'm having a little bit of difficulty with this question. I think I may have solved it, but I'm not sure about the negative symbols and whether or not they should be included in my calculations.
Determine the values of sin θ, cos θ, tan θ, csc θ, sec θ, and cot θ at
(-3, -4) on the terminal arm of an angle θ in standard position.
I know that if the angle is in standard position the vertex is at (0,0) and that the initial arm is on the positive x-axis. By plotting (-3,-4) on the Cartesian plane I know that the terminal arm is in quadrant III.
Therefore, side a= -4 units and side b= -3 units. I then used the Pythagorean theorem to solve for the hypotenuse and found it to be 5 units.
Solving for each of the trigonometric functions:
sinθ = opp/hyp
sinθ = 4/5
sinθ = 0.8
θ = sin^-1 0.8
θ = 53.1301
** OR, should the 4 be a -4?? **
cosθ = 3/5
cosθ = 0.6
θ = cos^-1 o.6
θ = 53.1301 | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986151386528394,
"lm_q1q2_score": 0.8301675272956072,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 1497.6451884060125,
"openwebmath_score": 0.8210509419441223,
"tags": null,
"url": "http://mathhelpforum.com/trigonometry/182235-values-angle-standard-position.html"
} |
astrophysics, supernova, neutron-star, white-dwarf
Title: Do “neutrino supernovae” exist? Core collapse supernovae release most of their energy in the form of neutrinos. About 1% of the neutrinos are absorbed by the thick outer envelope which powers a spectacular supernova explosion.
Core collapse can also happen in white dwarfs. According to this answer, white dwarfs made of light elements (He, C) explode upon reaching the Chandrasekhra mass limit, while white dwarfs consisting of heavy elements (O, Ne, Mg) collapse into neutron stars. The collapse is not much different than the core collapse of massive stars, except that the white dwarfs are not buried under a thick atmosphere. As a result, neutrinos will just escape freely with little absorption. | {
"domain": "astronomy.stackexchange",
"id": 6319,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrophysics, supernova, neutron-star, white-dwarf",
"url": null
} |
Note also that for each such $t$, $\psi(p^t)$ with respect to $G$ is equal to $\psi(p^t)$ with respect to this subgroup. Since $\sum_{t=1}^{k+1} \psi(p^t) = p^t = \sum_{t=1}^{k+1} \varphi(p^t)$, we have $\psi(p^{k+1}) = \varphi(p^{k+1})$. In particular, $G$ contains an element of order $p^{k+1}$, and so is cyclic. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9854964224384746,
"lm_q1q2_score": 0.8080019449869075,
"lm_q2_score": 0.8198933315126791,
"openwebmath_perplexity": 50.09002277114772,
"openwebmath_score": 0.993898332118988,
"tags": null,
"url": "https://crazyproject.wordpress.com/tag/subgroup/"
} |
robotic-arm, ros-hydro, build, uvc-cam, rospack
[rosbuild] Building package uvc_cam
Failed to invoke /opt/ros/hydro/bin/rospack deps-manifests uvc_cam
[rospack] Error: package/stack 'uvc_cam' depends on non-existent package 'driver_base'
and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH or t
ry calling 'rosdep update'
CMake Error at /opt/ros/hydro/share/ros/core/rosbuild/public.cmake:129 (message):
Failed to invoke rospack to get compile flags for package 'uvc_cam'. Look
above for errors from rospack itself. Aborting. Please fix the broken
dependency!
Call Stack (most recent call first):
/opt/ros/hydro/share/ros/core/rosbuild/public.cmake:203 (rosbuild_invoke_rospack)
CMakeLists.txt:12 (rosbuild_init)
-- Configuring incomplete, errors occurred!
make: *** [all] Error 1 | {
"domain": "robotics.stackexchange",
"id": 17832,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "robotic-arm, ros-hydro, build, uvc-cam, rospack",
"url": null
} |
shors-algorithm, quantum-phase-estimation, history
As to who first conceptualized the quantum phase estimation algorithm, Seth Lloyd, in his lecture at Keio University on the HHL algorithm, also posits that this was implicit in von Neumann's codification of measurement. See Lloyd's lecture here at about the 18 minute mark.
Rhetorically, is this similar to contending that Gauss anticipated the Fast Fourier Transform well before Cooley and Tukey (and, even before Fourier)?
(As an aside and on a lark, I reread Deutsch's chapter on quantum computing in The Fabric of Reality, which came out in ~1996. So many predictions! Some right, some off, some for the worse and some for better!) | {
"domain": "quantumcomputing.stackexchange",
"id": 3637,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "shors-algorithm, quantum-phase-estimation, history",
"url": null
} |
cosmology, space-expansion, cosmological-constant
Title: Why is $\Lambda=0$ for a flat matter dominated universe? I was looking over some of my cosmology notes and was considering the Einstein de-sitter model of a matter dominated universe. I know that in this case that k=0 and also furthermore that $\rho(t)$ is proportional to $a(t)^{-3}$. Then when I looked at some solutions I saw that my lecturer assumes also that $\Lambda=0$. My question is , is this always true for a flat universe and if so why?
Note: one thought I have is that if the universe is matter dominated instead of dark matter dominated then we can take $\Lambda$ to be negligible is that the reason , or is it to do do with the universe being flat? In a matter dominated universe, matter is by definition the dominant contribution and all others are approximated to zero. We take $\Lambda = 0$ because otherwise the universe wouldn't be matter dominated. Of course, one may ask further questions, such as | {
"domain": "physics.stackexchange",
"id": 54781,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, space-expansion, cosmological-constant",
"url": null
} |
halting-problem
Title: Does the existence of the universe mean Chaitin's number is more than half? This may be too philosophical for this stackexchange.
Chaitin's constant $\Omega$ is the probability that a bitstring will halt when run on a universal Turing machine. It is uncomputable due to the halting problem.
My thought is that if $\Omega<\frac{1}{2}$ then most likely nothing would exist. So, since something does exist, it is most likely that $\Omega \geq \frac{1}{2}$.
Is this reasoning valid? No, your reasoning is invalid. Chaitin's constant depends on the choice of a universal Turing machine, and by appropriately choosing the universal Turing machine, we can fix the first $n$ bits of Chaitin's constant to be whatever we want, for any fixed $n$.
One reason to suspect your reasoning is that the actual argument is missing. Your argument can be paraphrased as follows:
$\Omega$ is the probability of something.
If $\Omega < 1/2$ then something counterfactual.
Hence I suspect that $\Omega \geq 1/2$. | {
"domain": "cs.stackexchange",
"id": 9643,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "halting-problem",
"url": null
} |
Me with the co ordinate axes are called direction.... Specify the direction angles of the vector a of norm 61 and angles! Line along which your vector is applied ‹2, -4, -2›I Know How to Find the direction angles to... Line along which your vector is applied number has been announced concept angles. − 1 2, − 1 2, √ 2 2 direction angles correct to the nearest degree. been... 0 12.1 direction angles of the vector 37. c, c, c,,! Angles are called direction coseines of the vector angles and direction angles of the vector, not only the.... Ratios of a vector - Examples, not only the magnitude vector Examples! | {
"domain": "vftr.es",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9724147201714922,
"lm_q1q2_score": 0.8226068822333621,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 970.986567644874,
"openwebmath_score": 0.712080180644989,
"tags": null,
"url": "http://vftr.es/assassin-s-tnlu/find-the-direction-cosines-and-direction-angles-of-the-vector-eb69b2"
} |
c, strings, pattern-matching
for (int j = 0; j < *ret; j++)
;
There's no return statement if the loop completes.
getr_seq()
Why are we working through this character by character, when we have a perfectly good string library provided in C? We can use strcmp() or memcmp() to compare the substrings, and strcpy()/memcpy() to copy characters (though I don't see any need to do so, meaning we can eliminate the array parameter).
This function is also missing a return statement in at least one path.
Modified code
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
static bool is_repeating(const char *arr, size_t chunk_size)
{
/* are all substrings of length i equal? */
for (const char *chunk = arr + chunk_size; *chunk; chunk += chunk_size) {
if (memcmp(arr, chunk, chunk_size)) {
/* no, unequal */
return false;
}
}
/* all length-i substrings identical */
return true;
} | {
"domain": "codereview.stackexchange",
"id": 41663,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c, strings, pattern-matching",
"url": null
} |
message-filters, boost, time, timestamp, timesynchronizer
Hello,i just want to use TimeSynchronizer,do i need install boost?Bescause when i include these headers and compile code,it seems to show boost error.Thank you.
Comment by ahendrix on 2016-02-24:
@aids293: if you have the topic_tools package installed, it should install the libraries you need too. Please ask a new question and include your source code and the full error message.
Comment by aids293 on 2016-02-26:
Ok ,thank you | {
"domain": "robotics.stackexchange",
"id": 23867,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "message-filters, boost, time, timestamp, timesynchronizer",
"url": null
} |
-
Where do you use the value of 16 in the denominator of the right hand side? If you replace that value by anything else, the solution is the empty set (as is readily seen by letting $x = 0$). – whuber Sep 2 '10 at 21:50
This answer also ignores the possibility that $p(0) = 0$. – Aryabhata Sep 2 '10 at 21:56
@Moron: No, the proof explicitly determines the roots via their shift symmetry. That zero is not one of them is not relevent. – Bill Dubuque Sep 2 '10 at 22:03
@whuber: The proof doesn't need to use the 16 in the denominator (except to verify that said p(x) is a solution - which trivial fact I left to the reader - it's obvious if you understand the proof) – Bill Dubuque Sep 2 '10 at 22:06
@Bill: What you said does nothing to eliminate the fact that x^k could be a factor of p(x). Why can't your 'shift symmetry map' map 0 to itself? Also, $p(x) = 0$ does not imply $p(2x) = 0$ (from the functional equation). For instance, $x=16$. – Aryabhata Sep 2 '10 at 22:14 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759624105493,
"lm_q1q2_score": 0.8356600300896171,
"lm_q2_score": 0.8519528076067262,
"openwebmath_perplexity": 939.5338640697898,
"openwebmath_score": 0.9513248801231384,
"tags": null,
"url": "http://math.stackexchange.com/questions/3888/find-polynomials-such-that-x-16p2x-16x-1px/3889"
} |
So, following is my first attempt at Standards for my AP Statistics class, and I’ll be using them this year. In sharing this, I have two hopes:
• Maybe some teacher out there might find some use in my Standards.
• More importantly, I’d LOVE some feedback from anyone on this work. It feels much too long to me, but I wonder if it is really too much or too little. Have I left something out?
At some point, all work needs a public airing to improve. That time for me is now. Thank you in advance on behalf of my students for any feedback.
## Chemistry, CAS, and Balancing Equations
Here’ s a cool application of linear equations I first encountered about 20 years ago working with chemistry colleague Penney Sconzo at my former school in Atlanta, GA. Many students struggle early in their first chemistry classes with balancing equations. Thinking about these as generalized systems of linear equations gives a universal approach to balancing chemical equations, including ionic equations. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9914225125587971,
"lm_q1q2_score": 0.8304352926360243,
"lm_q2_score": 0.8376199673867852,
"openwebmath_perplexity": 1620.191718840117,
"openwebmath_score": 0.7199357748031616,
"tags": null,
"url": "https://casmusings.wordpress.com/"
} |
standard-model, supersymmetry, higgs, scales, fine-tuning
So as an order-of-magnitude estimate, the Z-boson mass, the W-boson mass, and the (lightest) Higgs boson (and vev) have to be of the same order and we call it the electroweak scale.
Now, the high scale. In your definition of the hierarchy problem, you just define it as the Planck scale. In the Higgs fine-tuning problem, you don't define the high scale explicitly but it's the scale of new particles or effects whose masses affect the Higgs mass via the quadratic divergence. | {
"domain": "physics.stackexchange",
"id": 5175,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "standard-model, supersymmetry, higgs, scales, fine-tuning",
"url": null
} |
classical-mechanics, rotational-dynamics
$$L_i = \sum_j I_{ij} \omega_j.$$
Since the plate is rotating, the $I_{ij}$ change over time; in the absence of external torques the $L_i$ are constant, but that doesn't mean the $\omega_i$ are.
I'm not sure what would make this intuitive to you, but a simpler case might be a barbell with masses on the ends. Picture it oriented diagonally but rotating about the vertical axis -- this should look quite unnatural, and impossible if the barbell is isolated. | {
"domain": "physics.stackexchange",
"id": 57267,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, rotational-dynamics",
"url": null
} |
So according to the workbook, its last step would be:
= $2\sqrt{x - 4} + u + \ln(x - 4)^4 + C$
= $2\sqrt{x - 4} + (x - 4) + \ln(x - 4)^4 + C$
= $2\sqrt{x - 4} + x + \ln(x - 4)^4 + C$
2. I think the way you did it kind of implies that $\int \frac{u}{u}du=x$ because of the way you kept your terms in order. The book's method is more correct in my opinion as it notes that the above integral doesn't equal x, but u + C, then back-substitutes x-4 for u and combines all the constants into one C.
3. Hello, scherz0!
What you did is correct.
. . I would not have simplifed first as you did . . .
We are given: . $\int \frac{\sqrt{x - 4} + x}{x - 4}\,dx$
Let: $\sqrt{x-4} \:=\: u \quad\Rightarrow\quad x-4\:=\:u^2 \quad\Rightarrow\quad x \:=\: u^2+4 \quad\Rightarrow\quad dx \:=\:2u\,du$
Substitute: . $\int \frac{u + (u^2+4)}{u^2}\,(2u\,du) \;\;=\;\;2\int\frac{u^2+u-4}{u}\,du \;\;=\;\; 2\int\left(u + 1 - \frac{4}{u}\right)\,du$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.980875959894864,
"lm_q1q2_score": 0.8337162853506528,
"lm_q2_score": 0.84997116805678,
"openwebmath_perplexity": 360.51982769461443,
"openwebmath_score": 0.9221338033676147,
"tags": null,
"url": "http://mathhelpforum.com/calculus/45334-integration-rational-expression-alternative-method.html"
} |
• complements means that the direct sum of these subspaces is $\mathbb{R^3}$ – user392395 Jun 7 '17 at 13:12
• Can you comment on this statement by the professor: "nullspace contains all the vectors that are perpendicular to the row space"? Shall I disregard that statement and move on? – jumpmonkey Jun 7 '17 at 13:31
• @jumpmonkey "It contains ... vectors that are perpendicular to the row space [and no vectors which are not]" = nullspace and row space are orthogonal. "It contains all [such perpendicular vectors]" (emphasis mine) = the direct sum of the nullspace and row space is $\Bbb R^n$. Hence the nullspace and the row space are orthgonal complements. – user137731 Jun 7 '17 at 13:34 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9648551546097942,
"lm_q1q2_score": 0.8040375352438335,
"lm_q2_score": 0.8333245994514084,
"openwebmath_perplexity": 181.356704823688,
"openwebmath_score": 0.799794614315033,
"tags": null,
"url": "https://math.stackexchange.com/questions/2313448/what-is-the-difference-between-orthogonal-subspaces-and-orthogonal-complements"
} |
clojure, brainfuck
:else (let [actions {\+ [[:cells cell-pointer] inc]
\- [[:cells cell-pointer] dec]
\> [[:cell-pointer] inc]
\< [[:cell-pointer] dec]
\. [[:printedchars] #(apply str % (char pointed-cell))]
\, [[:cells cell-pointer] (fn [_] (.charCodeAt text-input 0))]}]
(-> (if-let [[path f] (actions current-symbol)]
(update-in interpreter-state path f)
interpreter-state) ; If current char is unknown, just continue
(update :reader-position inc)
(assoc :movement :moving-forward)))))))
which is still sufficiently unwieldy but an improvement, I think. | {
"domain": "codereview.stackexchange",
"id": 17795,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clojure, brainfuck",
"url": null
} |
waves
Do the red lines on the LHS of the barrier represent a single wave, or lots of individual waves that are coherent?
In other words, does a single wave of light look like a rippled sheet or a rippled string in 3D? Light is usually represented as a sine wave but that is misleading. An electromagnetic wave is not a displacement of anything. Nothing is actually moving back and forth. What oscillates is the strength or the direction of the electric field at every point. So no, light not similar to a rippled sheet or string.
What those red lines represent are regions where the electric field is a maximum (or any other point in it's cycle). To the left of the diagram, light arrives as a plane wave so the regions with a common value of the electric field are parallel planes. After a barrier, regions with a common value for the electric are curved. | {
"domain": "physics.stackexchange",
"id": 61640,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves",
"url": null
} |
The same reasoning can be repeated to show that the $(i,j)$-entry of $A^4$, which is
$$a_{ij}^{(4)}=a_{i1}^{(3)}a_{1j}+a_{i2}^{(3)}a_{2j}+a_{i3}^{(3)}a_{3j}+a_{i4}^{(3)}a_{4j}+a_{i5}^{(3)}a_{5j}+a_{i6}^{(3)}a_{6j}$$
is the number of ways to get a message from person $i$ to person $j$ in exactly $4$ steps. In fact, it’s clear that if $a_{ij}^{(n)}$ is the number of ways to get a message from person $i$ to person $j$ in exactly $n$ steps, the same basic argument shows that
$$a_{ij}^{(n+1)}=a_{i1}^{(n)}a_{1j}+a_{i2}^{(n)}a_{2j}+a_{i3}^{(n)}a_{3j}+a_{i4}^{(n)}a_{4j}+a_{i5}^{(n)}a_{5j}+a_{i6}^{(n)}a_{6j}$$
is the number of ways to get a message from person $i$ to person $j$ in exactly $n+1$ steps. That’s the induction step in a proof that for all $n\ge 1$, $a_{ij}^{(n)}$ is the number of ways to get a message from person $i$ to person $j$ in exactly $n$ steps. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.990440601781584,
"lm_q1q2_score": 0.8188089310479402,
"lm_q2_score": 0.8267117983401363,
"openwebmath_perplexity": 237.8507156448271,
"openwebmath_score": 0.6853565573692322,
"tags": null,
"url": "http://math.stackexchange.com/questions/305869/a-multiple-part-question-about-interpreting-powers-of-the-adjacency-matrix-of-a"
} |
Round To Three Decimal Places. Greetings; I am using an hp 48gx. How to convert binary to decimal: The binary number system, also known as the base 2 number system; is used by all modern generation computers internally. If you have not read the forum rules, please take time do so - members are required to start new threads for their questions. Note that if the percent value is a integer, the '. 3 degrees (expansion at OEIS: A072097). Conversion From Radians To Degrees. 360° = 2 π. Degrees to radians converter The following calculator will convert angles between degrees and radians. How to insert these locations in excel and convert them later to decimal degrees? Stack Exchange Network Stack Exchange network consists of 175 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Multiply the decimal hours by 60 to convert to minutes. In this lesson, we will examine those relationships, | {
"domain": "agnesbetz.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102542943773,
"lm_q1q2_score": 0.826083951679943,
"lm_q2_score": 0.8539127510928476,
"openwebmath_perplexity": 1002.7019857070425,
"openwebmath_score": 0.5753418207168579,
"tags": null,
"url": "http://utiv.agnesbetz.de/how-to-convert-decimal-to-degrees-trigonometry.html"
} |
structural-engineering
Title: Fixing a Roof with Toe-bearing Rafters I have acquired an old loading dock built in 1930 that has toe-bearing rafters in addition to undersized purlins. As you can imagine, many of the rafters have sagged. Also, because of the toe-bearing design of the rafter, the building has no eaves.
There are many articles about avoiding toe-bearing design. But there aren't many articles about remedying the situation in retrospect. Here is a drawing of the existing situation. The small white block in the middle of the rafter is a purlin.
So here are some questions and thoughts:
Inexpensive Fix - The articles state that you could use some type of joist hanger to possibly fix the problem, but it's not clear to me at all what type of joist hanger would help me. This would be a low cost way to fix the issue. I could:
Jack up the sagging rafters
Sister up a new rafter, and
Use a joist hanger to help prevent cracks in the re-entrant corner. | {
"domain": "engineering.stackexchange",
"id": 824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "structural-engineering",
"url": null
} |
ds.algorithms, total-ordering, sorting
Title: What is a good special-case sorting algorithm? I have a dataset which is a number of objects arranged in a 2-D grid. I know I have a strict ordering, increasing as you go left-to-right within each row, and increasing as top-to-bottom within each column. For example,
1 2 3
4 6 7
5 8 9 | {
"domain": "cstheory.stackexchange",
"id": 1,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ds.algorithms, total-ordering, sorting",
"url": null
} |
# What is the general formula for a convergent infinite geometric series?
This question is related, but different, to one of my previous questions (Does this infinite geometric series diverge or converge?). To avoid the previous question getting off-topic, I have created a separate question.
I'm looking for the general formula of a convergent infinite geometric series. I want to be able to calculate any convergent infinite geometric series I come across, regardless of where it starts at. Some examples of this are:
$$\sum_{n=0}^\infty ar^n$$
$$\sum_{n=1}^\infty ar^n$$
$$\sum_{n=2}^\infty ar^n$$
...
$$\sum_{n=5}^\infty ar^n$$
...
etc.
I would appreciate it if someone could present such a formula and explain the reasoning behind it. Also, please illustrate how the formula can be applied to the above examples.
Thank you. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9871787883738261,
"lm_q1q2_score": 0.8711140796646355,
"lm_q2_score": 0.8824278741843883,
"openwebmath_perplexity": 279.0794507593227,
"openwebmath_score": 0.9252971410751343,
"tags": null,
"url": "https://math.stackexchange.com/questions/2002780/what-is-the-general-formula-for-a-convergent-infinite-geometric-series"
} |
-
The two definitions are equivalent, let me give a quick proof:
Let $B\subseteq E$ be a subspace of a metric space $(E,d)$.
$\Rightarrow$: Assume there is an $r>0$ such that $d(x,y)<r$ for all $x,y\in B$. Fix any $p$ in $B$ then $d(p,x)<r$ for all $x\in B$.
$\Leftarrow:$ Assume there is a $p\in E$ and $r>0$ such that $d(p,x)<r$ for all $x\in B$ then for all $x,y\in B$ we have $$d(x,y) \le d(p,x) + d(p,y) < r+r=2r.$$
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765546169712,
"lm_q1q2_score": 0.8187542801369913,
"lm_q2_score": 0.8354835391516132,
"openwebmath_perplexity": 75.55831979628574,
"openwebmath_score": 0.9473347663879395,
"tags": null,
"url": "http://math.stackexchange.com/questions/730533/what-is-the-exact-definition-of-a-bounded-subset-in-a-metric-space-in-relatio"
} |
physical-chemistry, kinetics, adsorption
Adsorption rate: $r_\mathrm a = \sum_m k_\mathrm a [\ce{H}] x_m = k_\mathrm a [\ce{H}]x_0 + k_\mathrm a [\ce{H}]x_1$
This is just the typical kinetic expression – adsorption rate constant multiplied by the concentration of hydrogen atoms available to adsorb times the concentration of the various dust particles that can adsorb a hydrogen atom, which are only $x_0$ and $x_1$.
Desorption rate: $r_\mathrm d = \sum_m k_\mathrm d m x_m = (k_\mathrm d \cdot 0 \cdot x_0) + (k_\mathrm d \cdot 1 \cdot x_1) + (k_\mathrm d \cdot 2 \cdot x_2)$ | {
"domain": "chemistry.stackexchange",
"id": 1474,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, kinetics, adsorption",
"url": null
} |
differential-equations, greens-functions, propagator, klein-gordon-equation
Title: Check of the Green function for the Klein-Gordon equation In order to derive the Green function for the Klein-Gordon equation, one considers
$$
\Box G(x-x')+m^2G(x-x')=\delta^4(x-x')
$$
where $\delta^4(x)=\delta(x_0)\delta(x_1)\delta(x_2)\delta(x_4)$. The widely known solution (e.g. see propagator) will depend on distributions like
$$
\Theta(x_0^2-x_1^2-x_2^2-x_3^2), \qquad \delta(x_0^2-x_1^2-x_2^2-x_3^2).
$$
Therefore, if I substitute the solution back into the equation, it is difficult to see how to recover the more standard $\delta^4(x)$. On the other side, in momentum space, we know how to move from $d^4p$ to $d^3p/(2E)$ and keeping Lorentz invariance. What is the further condition in place for this case? | {
"domain": "physics.stackexchange",
"id": 98731,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "differential-equations, greens-functions, propagator, klein-gordon-equation",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.