text stringlengths 1 1.11k | source dict |
|---|---|
matlab, wavelet, bandwidth
x=sin(2*pi*t*.1).*(t<10)+sin(2*pi*t*0.3).*...
(t<30)+sin(2*pi*t*0.6).*(t<10).*exp(-t*.1); Remember that Wavelet Transforms are nothing but time-localized filtering/correlation operations. The wavelet transforms provide a unified framework for getting around the Heisenberg Uncertainly Principle that the Fourier Transform suffers from. So when you ask "what should my settings be for bandwidth, and center frequency", you are asking for filter parameters to be given to you. No one can give you filter parameters but yourself, and your application. This is why they are parameters. :-)
More concretely, how to pick your $F_c$ and $F_b$ have to do with the nature of your signal. First, some pre-liminaries: | {
"domain": "dsp.stackexchange",
"id": 1097,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, wavelet, bandwidth",
"url": null
} |
electricity, electrical-resistance, voltage
*(physically, when I put the numbers into the equations it make sense mathematically, but I don't understand the physics side) The resistance through the voltmeter is so much greater than that of the resistor that the resistor's resistance has negligible impact on the circuit. A precise-enough voltmeter would see a very small difference, on the order of micro or nanovolts. | {
"domain": "physics.stackexchange",
"id": 3482,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, electrical-resistance, voltage",
"url": null
} |
beginner, c, sorting, homework
Put "magic constants" into defines:
#define BUFLEN 80, #define INPUT_FILE "start.txt" etc.
readIn() etc. will perhaps in future be re-used with different filenames -- so prefer giving them as a parameter rather than relying on globals.
Preference: Use function name in parameter to perror(), eg.:
if((fp = fopen(INPUT_FILE, "r")) == NULL) {
perror(__func__);
exit(EXIT_FAILURE);
}
if you want to not only display the function called you can use.
fprintf(stderr, __func__ "%s, \"r\"": %s\n", filename, strerror(errno));
This is much more useful information, imho (Thanks to @chux for the hint with the __func__-macro)
I find this hard to read:
size_t i, j = firstItemIndex + 1, groupSize = 1;
Why not seperate the declarations and put i into the following for statement (not only here)?
size_t j = firstItemIndex +1, groupSize = 1;
for (size_t i = firstItemIndex +1, ... | {
"domain": "codereview.stackexchange",
"id": 20530,
"lm_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, sorting, homework",
"url": null
} |
quantum-mechanics, semiconductor-physics, electronics, quantum-tunneling, decoherence
The electrons which are stored in the transistor's gate - how can we estimate the typical coherence time after they are transferred to the gate? (by "coherence time" I mean the time before they get strongly entangled with their immediate environment). (I understand that this question might not make sense. If so, I would appreciate if you can explain why it does not make sense.)
The electrons in the gate - can we say that they have a discrete energy spectrum?
More precisely, how can we estimate the energy gaps between energy eigenvalues of the electrons? | {
"domain": "physics.stackexchange",
"id": 73529,
"lm_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, semiconductor-physics, electronics, quantum-tunneling, decoherence",
"url": null
} |
discrete-mathematics, hashing, modular-arithmetic
$$p \approx \exp\{-p^2(p-1)^2/(2 \cdot m^p)\},$$
which when $p \ll m^{p/4}$ is about
$$p \approx 1 - {p^2(p-1)^2 \over 2 \cdot m^p}.$$
This is exponentially close to 1, once $m$ is large enough. This is not a proof, this is just a heuristic, as it treats each function as a random function (uniformly distributed across all possible functions of that signature), which is in reality not correct.
I doubt it matters much whether there are exactly $p(p-1)$ such functions or not.
I do want to validate your reactions of dislike having to take things on faith, and your failure to find find a simple way to prove such a claim. | {
"domain": "cs.stackexchange",
"id": 20474,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discrete-mathematics, hashing, modular-arithmetic",
"url": null
} |
co.combinatorics, notation
Multisets versus characteristic functions
You could try to treat multisets as being identical with their characteristic functions, so that $\{1,2,2,3\}$ can be identified with a function $f$ such that $f(2) = 2$, $f(1) = f(3) = 1$, and $f(n) = 0$ otherwise. Just as we sometimes identify languages $L \subset \{0,1\}^\ast$ with their characteristic functions $L: \{0,1\}^\ast \to \{0,1\}$, this is okay as an abuse of notation.
But taking this too seriously has problems. For instance, you might not be pre-occupied with sums, but does $\mathrm{Sum}(f)$ represent $\sum_n f(n)$ (the sum of the values of $f$), or $\sum_n n\cdot f(n)$ (the sum of the elements of the multiset represented by $f$)? If you intend to act as though multisets "really are" their histograms, you must be prepared for such potential confusions by people who assume you have important reasons to choose that convention. | {
"domain": "cstheory.stackexchange",
"id": 2992,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "co.combinatorics, notation",
"url": null
} |
homework-and-exercises, electric-fields
(Here you can see why I'm not a renowned artist). Each segment has a thickness of $dr$ and therefore a volume of $dV=(2\pi r) a dr$. It also has a charge $dq=\rho_o dV$.
For any point $(x,y,z)$ outside of the layer itself the electric field must point upwards and it must be the sum of the fields from all the infinitesimal rings under it. The further a right is, the bigger the angle $\theta$ between $dE$ and the $z$-axis. So we have:
$$E=\int_S dE = \int_S \frac{1}{4\pi \epsilon_o} \frac{\rho_o dV}{r^2+z^2}\cos{\theta} = \int_S \frac{1}{4\pi \epsilon_o} \frac{\rho_o dV}{r^2+z^2}\frac{z}{\sqrt{r^2+z^2}}$$
Taking the constants out, integrating and simplifying we get:
$$E= \frac{\rho_o a}{2\epsilon_o}$$
Now, I don't think what I got is right even if I'm not able to see where I failed. The field apparently doesn't depend on how close or far away we are from the layer, and that seems wrong. So I either made a math mistake or my premises were wrong. Where did I get it wrong and how? | {
"domain": "physics.stackexchange",
"id": 39396,
"lm_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, electric-fields",
"url": null
} |
ros2
I have test the behavior and global planner as shown in the documentation, and outputs are similar to those that are shown there. However, I can't figure out the problem now. Any hint would be much appreciated.
Originally posted by hakan on ROS Answers with karma: 15 on 2021-12-06
Post score: 0
Original comments
Comment by Josh Whitley on 2021-12-11:
When you say "Won't drive to the goal," do you mean "doesn't move at all" or something different? Could you be more specific about the behavior?
Additionally, could you please answer the following questions?
Autoware Version or Git Hash
ADE or not?
Comment by hakan on 2021-12-13:
I've added the version information. The issue I'm facing is: after giving a goal position with 2D Goal Pose, the car doesn't move at all. It makes a break (rear lights turn red) and then stays where it is.
Comment by Maxime on 2021-12-16:
Please try running Autoware with option with_obstacles:=false. | {
"domain": "robotics.stackexchange",
"id": 37216,
"lm_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
} |
organic-chemistry, acid-base, biochemistry
Also there are three amino acids (glycine, leucine, aspartine) which have same $\mathrm{p}K_\text{a}(\ce{-NH3+})$ but different $\mathrm{p}K_\text{a}(\ce{-COOH})$. I found the following pKa values for glycine and alanine from the CRC Handbook of Chemistry and Physics via Sigma-Aldrich:
Glycine $\ce{COOH}$: 2.34
Alanine $\ce{COOH}$: 2.34
Glycine $\ce{NH3+}$: 9.60
Alanine $\ce{NH3+}$: 9.69
First, although the values for the carboxylic acid are identical as reported, you would see a difference if you found a value reported with enough precision. The carboxylic acid is not immune to changes in the structure of the rest of the molecule.
Second, the difference between 9.60 and 9.69 is pretty small. In most practical situations, the two amino acids would behave identically with regard to the $\ce{NH3+}$ pKa. | {
"domain": "chemistry.stackexchange",
"id": 2564,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, acid-base, biochemistry",
"url": null
} |
quantum-mechanics, homework-and-exercises, dispersion
Title: Matter waves dispersion I tried to compare the phase and group velocity of mater waves, say a free electron. I did this once using the de Broglie equation and then using relativity and got different results:
$$E = \hbar \omega = \frac{p^2}{2m} = \frac{\hbar^2}{2m}k^2,\ \textrm{where }\ \ p= \hbar k$$
$$\omega = \frac{\hbar}{2m} k^2$$
$$v_{ph} = \frac{\omega}{k} = \frac{\hbar}{2m}k \ \ \ \ \ \ \ \ \ \ \ v_{gr}= \frac{\partial \omega}{\partial k}=\frac{\hbar}{m}k $$
Now using relativity:
$$E = \sqrt{p^2 c^2 + m_0^2c^4}$$
$$v_\textrm{ph} = \frac{\hbar \omega}{\hbar k} = \frac{E}{p} = \frac{\gamma m_0 c^2}{\gamma m_0 v} = \frac{c^2}{v} $$
$$v_\textrm{gr} = \frac{\partial E}{\partial p} = \frac{\partial \sqrt{p^2 c^2 + m_0^2c^4}}{\partial p} = \frac{c^2 p}{E}= v$$ | {
"domain": "physics.stackexchange",
"id": 34994,
"lm_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, homework-and-exercises, dispersion",
"url": null
} |
java, sorting, mergesort
* @param cmp the element comparator.
*/
private static <T> void merge(T[] source,
T[] target,
int leftIndex,
int leftBound,
int rightBound,
int targetIndex,
Comparator<? super T> cmp) {
int rightIndex = leftBound; | {
"domain": "codereview.stackexchange",
"id": 14553,
"lm_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, sorting, mergesort",
"url": null
} |
can not be same... \Displaystyle \lambda }, is the factor by which the eigenvector is scaled multiplied a! = 2 or −1 or 1 2 or 1 2 or −1 1... Is real$ a $the columns of matrix mechanics created by Heisenberg... Are non-real for all indices and.. every square diagonal matrix of dimension columns of a symmetric matrix it. Or more: the eigenvalues of a by which the eigenvector eigenvalues of a a transpose scaled, Ahave different of! Eigenvalues-Eigenvectors transpose or ask your own question symeigensystem ( a, x, L ) calculates right.. Characteristic equation and eigenvalues at least it seems true numerically are scaled to have length ( norm ).!$ \transpose { a } $is an eigenvalue of a transpose eigenvalues of a a transpose diagonal, you agree to our Policy! | answered may 23 '12 at 11:12 n on the unit circle when Q transpose Q the! Factorization function solution, see the post “ transpose of a are nonnegative ( ≥ 0 ) then. C, and Pascual Jordan in 1925 're on the diagonal entries of the | {
"domain": "presence.nu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9566341999997378,
"lm_q1q2_score": 0.8361721703239672,
"lm_q2_score": 0.8740772286044095,
"openwebmath_perplexity": 528.2495127282442,
"openwebmath_score": 0.8579239845275879,
"tags": null,
"url": "https://presence.nu/vegetable-curry-mwayir/4ae7e7-eigenvalues-of-a-a-transpose"
} |
c#, .net, reinventing-the-wheel
if (!Instance.services.ContainsKey(dictKey))
{
throw new KeyNotFoundException(string.Format("Could not find a service of type {0} with key {1}", type, key));
}
Instance.services.Remove(dictKey);
}
you should remove the ContainsKey() call and use the returned value of the Remove() call instead like so
public static void Unregister<T>(T service, object key) where T : class
{
var type = typeof(T);
var dictKey = new Tuple<Type, object>(type, key);
if (Instance.services.Remove(dictKey)) { return; }
throw new KeyNotFoundException(string.Format("Could not find a service of type {0} with key {1}", type, key));
}
Conclusion
Setting aside the points mentioned above:
your xml documentations looks pretty good, I couldn't find any flaw in them (quick glance).
your code is well structured and readable | {
"domain": "codereview.stackexchange",
"id": 14156,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, .net, reinventing-the-wheel",
"url": null
} |
are congruent. Before finding the _____ of a regular polygon, you must first find the perimeter. A quadrilateral is a parallelogram if following geometric characteristics are found. So, we can use the Side-Angle-Side Congruence Theorem to declare the two triangles congruent. Theorem 6.2A states: If one pair of opposite sides of a quadrilateral is both _____ and congruent, then the quadrilateral is a parallelogram. Theorem 8.5 If in a quadrilateral, each pair of opposite angles is equal, then it is a parallelogram. A parallelogram is a quadrilateral in which both pairs of opposite sides are parallel. a. A rhombus, on the other hand, may be defined as an opposite. 180° b. If a quadrilateral is a parallelogram, then its opposite sides are _____. If a quadrilateral is a parallelogram, then its opposite sides are _____ congruent. 15) Theorem 6.5D states that if a quadrilateral is a kite, then the longer diagonal bisects the _____ angles. This video explains the term 'opposite sides' which | {
"domain": "wikisurgery.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9496693702514736,
"lm_q1q2_score": 0.809073475574593,
"lm_q2_score": 0.8519527963298946,
"openwebmath_perplexity": 625.1245713626496,
"openwebmath_score": 0.758575975894928,
"tags": null,
"url": "http://www.wikisurgery.com/kfyuns/a-quadrilateral-is-a-parallelogram-if-its-opposite-sides-are-4d4b8b"
} |
is divisible by 4} \\\end{aligned}Therefore it is true for $$n=k+2$$ assuming that it is true for $$n=k$$.Therefore $$n(n+2)$$ is always divisible by $$4$$ for any even numbers. Let us assume that P(n) is true for some natural number n = k. or K3 â 7k + 3 = 3m, mâ N (i). Answer Save. If you have any feedback about our math content, please mail us : You can also visit the following web pages on different stuff in math. Step 2 : Let us assume that P(n) is true for some natural number n = k. \)$$2(2+2) = 8$$, which is divisible by 4.Therefore it is true for $$n=2$$.Step 2: Assume that it is true for $$n=k$$.That is, $$k(k+2) = 4M$$.Step 3: Show it is true for $$n=k+2$$. Absolute Value Algebra Arithmetic Mean Arithmetic Sequence Binomial Expansion Binomial Theorem Chain Rule Circle Geometry Common Difference Common Ratio Compound Interest Cyclic Quadrilateral Differentiation Discriminant Double-Angle Formula Equation Exponent Exponential Function Factorials Functions | {
"domain": "businessclassof.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9626731126558705,
"lm_q1q2_score": 0.8083893201841182,
"lm_q2_score": 0.8397339756938818,
"openwebmath_perplexity": 801.9683889375204,
"openwebmath_score": 0.7480453848838806,
"tags": null,
"url": "https://shop.businessclassof.com/blog/site/843l7.php?e6dca3=community-action-beaverton"
} |
# Is there a Pigeon hole principle proof
Let $a_i$, $1 \leq i \leq 5$ denote five positive real numbers such that $\sum_{i =1}^{5}a_i = 100$. Show that there exist a pair $a_i,a_j$ such that $|a_i-a_j|\leq 10$. Is there a proof using pigeon hole principle. I think i have a proof but it does not involve pigeon hole principle. My proof is:
Suppose there exist no such pair $a_i,a_j$. Assume that $a_1 < a_2 < a_3 < a_4 < a_5$, then $a_1 \in [0,20]$. As $a_i > a_{i-1} +10$ $\forall 1 \leq i \leq 4$, we have $100 = \sum_{i=1}^{5}a_i > 5a_i +100$. Hence by contradiction the claim cannot be true.
• This is a question in the book "walk through combinatorics" in the chapter Pigeon hole principle. Feb 27 '14 at 16:22
• Your solution doesn't invoke the pigeonhole principle explicitly, but implicitly. I.e., when you say that $a_1 \in [0, 20]$. Feb 27 '14 at 17:48 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9891815516660637,
"lm_q1q2_score": 0.8040733547572022,
"lm_q2_score": 0.8128673178375734,
"openwebmath_perplexity": 203.30628112693282,
"openwebmath_score": 0.9222196340560913,
"tags": null,
"url": "https://math.stackexchange.com/questions/692839/is-there-a-pigeon-hole-principle-proof"
} |
carbohydrates
Title: Reducing sugar among the given compounds The question is to determine which of the following sugars is not reducing?
I have the idea that in case of disaccharide sugars in which the monosachharide units are bonded via the carbon containing aldehydic group are non reducing.However the present question deals with sugars having monosaccharide units.I have no idea on how to deal with such sugars.Any insights?Thanks. The English wikipedia page on reducing sugars starts with
A reducing sugar is any sugar that is capable of acting as a reducing agent because it has a free aldehyde group or a free ketone group. All monosaccharides are reducing sugars [...] | {
"domain": "chemistry.stackexchange",
"id": 7841,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "carbohydrates",
"url": null
} |
c, parsing, functional-programming
parser b = regex( "\\." );
print_list( b ), puts("");
print_list( parse( b, chars_from_str( "a" ) ) ), puts("");
print_list( parse( b, chars_from_str( "." ) ) ), puts("");
print_list( parse( b, chars_from_str( "\\." ) ) ), puts("");
puts("");
parser c = regex( "\\\\." );
print_list( c ), puts("");
print_list( parse( c, chars_from_str( "a" ) ) ), puts("");
print_list( parse( c, chars_from_str( "." ) ) ), puts("");
print_list( parse( c, chars_from_str( "\\." ) ) ), puts("");
print_list( parse( c, chars_from_str( "\\a" ) ) ), puts("");
puts("");
parser d = regex( "\\\\\\." );
print_list( d ), puts("");
print_list( parse( d, chars_from_str( "a" ) ) ), puts("");
print_list( parse( d, chars_from_str( "." ) ) ), puts("");
print_list( parse( d, chars_from_str( "\\." ) ) ), puts("");
print_list( parse( d, chars_from_str( "\\a" ) ) ), puts("");
puts(""); | {
"domain": "codereview.stackexchange",
"id": 43456,
"lm_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, parsing, functional-programming",
"url": null
} |
java, optimization, performance, game, hangman
panel1.add(bottom, BorderLayout.SOUTH);// blank spaces and letters used (bottom)
gameFrame.setJMenuBar(menuBar);
gameFrame.setTitle("Hangman");
gameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
gameFrame.setIconImage(
new ImageIcon("hangmanIcon.png").getImage());
gameFrame.setResizable(false);
gameFrame.add(panel1);
gameFrame.setSize(800, 500);
gameFrame.setLocationRelativeTo(null);
gameFrame.setVisible(true); | {
"domain": "codereview.stackexchange",
"id": 5448,
"lm_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, optimization, performance, game, hangman",
"url": null
} |
recursion, vb.net, overloading
Public Class MyExcel
Public Overloads Function GetTable(ByVal SearchName As String, ByVal SearchSheets() As Worksheet, Optional ByVal ExactMatch As Boolean = False) As ListObject
If Not ExactMatch Then SearchName = "*" & SearchName & "*"
Try
For Each ws As Worksheet In SearchSheets
For Each lo As ListObject In ws.ListObjects
If lo.Name Like SearchName Then Return lo
Next
Next
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Return Nothing
End Function
Public Overloads Function GetTable(ByVal SearchName As String, ByVal SearchBooks() As Workbook, Optional ByVal ExactMatch As Boolean = False) As ListObject
Dim loFound As ListObject
Dim wsList As New List(Of Worksheet)
Try
For Each wb In SearchBooks
For Each ws In wb.Worksheets
wsList.Add(ws)
Next | {
"domain": "codereview.stackexchange",
"id": 14658,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "recursion, vb.net, overloading",
"url": null
} |
algorithms, graphs
Let $S$ denote the set of nodes that are currently localized. Initially, $S$ includes just the three seed nodes.
Repeat the following, until $S$ includes all nodes (i.e., until $S=V$):
For each node $v \in V\setminus S$, for all triples $s,t,u \in S$ of three nodes in $S$:
If $s,t,u$ are all adjacent to $v$, then append $v \to s,t,u$ to your
trilateration order. Assuming localization of $v$ doesn't fail, add
$v$ to $S$, and continue to the next iteration of the outermost loop. | {
"domain": "cs.stackexchange",
"id": 3013,
"lm_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, graphs",
"url": null
} |
Divergence theorem. Recommended for you. Use outward normal. The divergence theorem relates a surface integral across closed surface $$S$$ to a triple integral over the solid enclosed by $$S$$. But one caution: the Divergence Theorem only applies to closed surfaces. I Applications in electromagnetism: I Gauss' law. Free ebook http://tinyurl. Verify the Divergence Theorem for F = x2 i+ y2j+ z2 k and the region bounded by the cylinder x2 +z2 = 1 and the planes z = 1, z = 1. Verifying the Divergence Theorem In Exercises 3-8, verify the Divergence Theorem by evaluating ∫ s ∫ F · N d S as a surface integral and as a triple integral. (If the answer surprises you, look back at Prob. Since The divergence theorem gives:. Solution: Since divF=3 everywhere, we use the divergence theorem to obtain Z Z S F· dS = Z Z Z V ( divF)dV =3 × volume(V) =3. Verifying the Divergence Theorem In Exercises 3-8, verify the Divergence Theorem by evaluating ∫ S ∫ F · N d s as a surface integral and as a triple | {
"domain": "saltotech.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9904405991009794,
"lm_q1q2_score": 0.8253585073266065,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 476.73427828009363,
"openwebmath_score": 0.9027653932571411,
"tags": null,
"url": "http://saltotech.it/xmyz/verify-the-divergence-theorem-by-evaluating.html"
} |
phase, demodulation, quadrature
Thanks If you already have frequency then IQ is not needed. You could use the IQ waveform if you had it to create a frequency discriminator, but this appears to already have been done for you. This existing post provides further insight onto the phase (as determined by I and Q) and frequency versus time for the MSK waveform:
Difference between MSK and GMSK? | {
"domain": "dsp.stackexchange",
"id": 11802,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "phase, demodulation, quadrature",
"url": null
} |
Each ' denotes a group G' that is not simple but is Aut(G) where
G is the simple group in the preceding line [G':G] = 2.
For G=(P)SL_3(F_2), an outer automorphism is inverse transpose,
corresponding to the action of G on the dual 3-dimensional space over F_2.
As we'll see Aut(A_6) is more complicated, containing A_6 with index 4
rather than 2; in the F_9 picture it's "PΓL_2(F_9)".
"(P)SL_n(k)" means the group is both PSL_n(k) and SL_n(k),
which as we'll see happens whenever the group of nth roots of unity
in k (i.e. the n-torsion group of k*) is trivial, which in turn
means n is relatively prime to |k*| = |k|-1. The full list of
exceptional isomorphisms is about thrice as long, but includes
orthogonal, unitary, and symplectic groups, which we won't get to
in Math 155. The ATLAS lists them all (though not, I think,
in a single place). | {
"domain": "harvard.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319853876677,
"lm_q1q2_score": 0.8277402594148112,
"lm_q2_score": 0.8354835330070839,
"openwebmath_perplexity": 2557.5821634393883,
"openwebmath_score": 0.8611697554588318,
"tags": null,
"url": "http://abel.math.harvard.edu/~elkies/M155.15/notes.html"
} |
c++, rational-numbers, battle-simulation
However, this would be much better expressed (and with fewer errors!) as a constructor:
class Fraction {
public:
Fraction(unsigned long long numerator, unsigned long long denominator) :
top{numerator},
bottom{denominator}
{}
private:
unsigned long long top;
unsigned long long bottom;
};
Express operations as member functions where practical
If we need to multiply two fractions together, the usual way to do that is to declare two functions; one is a member function of the Fraction class and the other is a free-standing function. In this case, the member function might be this:
Fraction &Fraction::operator*=(const Fraction &f2) {
top *= f2.top;
bottom *= f2.bottom;
return *this;
}
The corresponding freestanding function is this:
Fraction operator*(Fraction f1, const Fraction &f2)
{
f1 *= f2;
return f1;
} | {
"domain": "codereview.stackexchange",
"id": 16103,
"lm_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++, rational-numbers, battle-simulation",
"url": null
} |
c++, strings, reinventing-the-wheel
We are dealing with characters and thus construction and destruction are completely irelavant to a string.
Fundamental flaw in your design is that you don't keep track of the string size as a member of the class. You re-calculate it every time by searching along the string looking for the \0 marker. This is a real problem with your design fix it otherwise your class is little better than a C-String.
Are you really only going to allocate 1 byte in the constructor?
basic_string()
{
__data = _Alloc().allocate(1);
_Alloc().construct(&__data[0], '\0');
}
Its likely that string will be expanded real soon. usually you see to size variables in this type of container. The amount currently being used (size). The amount we have allocated for use (reserved).
This is a dasterdly and very dangerious thing to do:
basic_string(void *_Init)
{
*this = basic_string(reinterpret_cast<const_pointer>(_Init));
} | {
"domain": "codereview.stackexchange",
"id": 6232,
"lm_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, reinventing-the-wheel",
"url": null
} |
java, performance, linked-list, deque, heuristic
final long thisSpliteratorNewLength = sizeLeft / 2L;
if (thisSpliteratorNewLength < MINIMUM_BATCH_SIZE)
return null;
final long newSpliteratorLength =
sizeLeft - thisSpliteratorNewLength;
final long newSpliteratorOffset = this.offsetOfSpliterator;
this.offsetOfSpliterator += newSpliteratorLength;
this.lengthOfSpliterator -= newSpliteratorLength;
Node<E> newSpliteratorNode = this.node;
this.node = list.node((int) this.offsetOfSpliterator);
return new LinkedListSpliterator<>(
list,
newSpliteratorNode,
newSpliteratorLength, // length
newSpliteratorOffset, // offset
expectedModCount);
}
@Override
public long estimateSize() {
return (long)(lengthOfSpliterator - numberOfProcessedElements);
} | {
"domain": "codereview.stackexchange",
"id": 42034,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, linked-list, deque, heuristic",
"url": null
} |
operating-systems
Title: What is the meaning of idiosyncratic when refering to multiprocess abstractions? I am currently reading this paper on library operating systems, more specific on Graphene. I stumbled over the following sentence:
"Because multiprocess abstractions, such as signals or System V IPC, tend to be idiosyncratic, an essential problem is identifying a minimal, host-independent substrate upon which to implement OS-specific abstractions." (Page 3, design options paragraph)
But I don't understand what is meant by idiosyncratic multiprocess abstractions? What is the meaning of idiosyncratic in the context of multiprocess abstractions? Let me rephrase your quote: | {
"domain": "cs.stackexchange",
"id": 11367,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "operating-systems",
"url": null
} |
energy, temperature, home-experiment
Title: How does my air-cooling unit work? During the winter, my office gets a little cold. I have a unit (essentially a space heater) that heats the area around it to help keep me warm.
Now that it's summer, I realize the unit also has a cool setting. I don't understand how this can work. It takes energy from the wall, and removes energy from the air. That energy has to go somewhere, doesn't it? Where does that energy go if not to the surrounding air?
Here's a picture of the unit. It's model number is 02044. Extensive investigation (i.e. shaking and listening) show no signs of water inside. Apparently it was recalled in 2008 for starting fires. Hopefully this is a newer model? :) I did a quick check and came up with a name of Air Tech Fan Heater Model 02044. Without knowing more, it is likely that in the cool mode it merely acts as a fan and moves air. Some describe the cooling sensation simply as the "wind chill effect". | {
"domain": "physics.stackexchange",
"id": 1036,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy, temperature, home-experiment",
"url": null
} |
javascript, array, sorting, heap, heap-sort
if (cmp != 0) {
return cmp < 0;
}
return this.fromIndexArray[runIndex1] < this.fromIndexArray[runIndex2];
},
this.siftDown = function(index) {
let nodeIndex = index;
let leftChildIndex = (index << 1) + 1
let rightChildIndex = leftChildIndex + 1;
let minIndex = index;
while (true) {
if (leftChildIndex < this.size
&& this.isLessThan(leftChildIndex, nodeIndex)) {
minIndex = leftChildIndex;
}
if (rightChildIndex < this.size
&& this.isLessThan(rightChildIndex, minIndex)) {
minIndex = rightChildIndex;
}
if (minIndex === nodeIndex) {
return;
}
this.swap(this.fromIndexArray, minIndex, nodeIndex);
this.swap(this.toIndexArray, minIndex, nodeIndex); | {
"domain": "codereview.stackexchange",
"id": 37847,
"lm_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, array, sorting, heap, heap-sort",
"url": null
} |
ros, genmsg, tutorial, message-generation
What is the difference between message_generation and genmsg?
In the add_dependencies function, the second function declared is for the messages, but why one is package_name_gencpp and the other package_name_generate_messages_cpp??? I am confused here. So, the name for the message generation dependency can be whatever I want. But where is that defined, how does ROS know the second dependency is for messages???
Tutorial Publisher Subscriber
Tutorial Service Client
Thanks. | {
"domain": "robotics.stackexchange",
"id": 17588,
"lm_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, genmsg, tutorial, message-generation",
"url": null
} |
Combinations problem: Choosing ways to select $8$ questions out of $12$.
In an exam, there are $12$ questions in total. He has to attempt $8$ questions in all. There are two parts: Part A and Part B of the question paper containing $5$ and $7$ questions respectively. How many ways are there to attempt the exam, such that you attempt eight questions and from each part you attempt at least three questions?
Please don't answer with the three case method. What I want is the error in my method?
My method: For three questions from each part, we do: $${5 \choose 3}*{7\choose3}$$. But 2 questions are lett, so for that, we multiply the expression by $${6\choose2}$$. Because 6 questions are left to choose from. But this does not give the answer, why? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429629196683,
"lm_q1q2_score": 0.8595177046988328,
"lm_q2_score": 0.8740772417253256,
"openwebmath_perplexity": 181.09858008432974,
"openwebmath_score": 0.7213014364242554,
"tags": null,
"url": "https://math.stackexchange.com/questions/1470160/combinations-problem-choosing-ways-to-select-8-questions-out-of-12"
} |
newtonian-mechanics, rotational-dynamics, friction
Now, what happens if some (external) force accelerates the axle?
In the absence of friction, the forward linear motion of the wheel increases due to the force on the axle, but there's nothing that increases the angular speed of the wheel: With that constant angular speed, the touch point will be moving forwards.
In the frictionless case, the wheel will start sliding forward on the surface. But that sliding is what friction at that surface can oppose with a fore that generates a torque to speed the wheel up.
Imagine a thrown bowling ball. At first it's sliding, and the friction acts to make it spin until it's rolling.
With a small acceleration, the wheel might not reach the point of sliding and kinetic friction. For small accelerations and large friction, it'll stay in the static friction regime. But that static friction will be generating a force in that same direction, causing the wheel to speed up it's rotation until it's rolling at the right speed to be rolling without friction. | {
"domain": "physics.stackexchange",
"id": 60082,
"lm_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, rotational-dynamics, friction",
"url": null
} |
special-relativity, causality, continuum-mechanics
However, it seems that because the rod is realistically held together by atomic forces that may take time to react to changes, the signal would actually travel slower than $c$.
I've heard one person posit that the signal would travel at the speed of sound for the object. However, I can't determine whether this is right or not.
Is there any reference to a paper/book/link that investigates this question for realistic materials? Is there any way to calculate the speed of the impulse? The speed of an impulse in the material is by definition the speed of sound. If you push or pull one end of the rod with a faster speed, you would create a shock wave in the material similar to the one created by a supersonic jet in the atmosphere: | {
"domain": "physics.stackexchange",
"id": 69655,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, causality, continuum-mechanics",
"url": null
} |
quantum-mechanics, quantum-field-theory, conservation-laws, noethers-theorem, gauge-invariance
provided the equations of motion ($\delta L / \delta \Psi = 0$, ...) are valid. All along I'm using that
$$\dfrac{\delta L}{\delta\phi}=\dfrac{\partial L}{\partial\phi}-\partial_{\mu}\dfrac{\partial L}{\partial\left[\partial_{\mu}\phi\right]}$$
and that $\int dv=\int d^{3}xdt$ for short. The conserved current is of course
$$j_{1}^{\mu}=\mathbf{i}\left(\Psi^{\ast}\partial^{\mu}\Psi-\Psi\partial^{\mu}\Psi^{\ast}\right)$$
since $\delta S / \delta \theta =0 \Rightarrow\partial_{\mu}j_{1}^{\mu}=0$.
Here is my first question: Is this really the demonstration for conservation of charge ? Up to now, it seems to me that I only demonstrated that the particle number is conserved, there is no charge for the moment...
Then, I switch to the local gauge symmetry. I'm starting with the following Lagrangian
$$L_{2}=\left(\partial^{\mu}+\mathbf{i}qA^{\mu}\right)\Psi\left(\partial_{\mu}-\mathbf{i}qA_{\mu}\right)\Psi^{\ast} -m^{2}\left|\Psi\right|^{2} -\dfrac{F_{\mu\nu}F^{\mu\nu}}{4}$$ | {
"domain": "physics.stackexchange",
"id": 7048,
"lm_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, conservation-laws, noethers-theorem, gauge-invariance",
"url": null
} |
quaternion, transform
Title: How to retrieve the quaternion in (x,y,z,w) format from tf
When we use tf to retrieve the rotation relationship of two coordinate in quaternion form, according to the API of Quaternion, we can only get the rotation axis and its angle.
However, the commonly required quaternion in ROS, such as quaternion in geometry_msgs::Pose, is always in (x,y,z,w) format. Therefore, is there any function to get the quaternion from tf in (x,y,z,w) form? That will be very convienent.
Originally posted by Albert K on ROS Answers with karma: 301 on 2013-12-06
Post score: 1
tf::Quaternion inherits from tf::QuadWord which has m_floats[0] through m_floats[3] which are x,y,z,w respectively. http://docs.ros.org/hydro/api/tf/html/c++/QuadWord_8h_source.html
Originally posted by tfoote with karma: 58457 on 2013-12-06
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 16370,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quaternion, transform",
"url": null
} |
ros, simulation, turtlebot, ros-kinetic, ros-indigo
Title: Issue installing turtlebot3 simulation on ubuntu 16.04
I switched from ubuntu 14.04 to ubuntu 16.04 and try to completely remove ros indigo and install ros kinetic and gazebo9
I followed a guide to install .
This is a lists of my command on terminal:
cd ~/catkin_ws/src
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
cd ~/catkin_ws && catkin_make && source ~/catkin_ws/devel/setup.bash | {
"domain": "robotics.stackexchange",
"id": 30625,
"lm_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, simulation, turtlebot, ros-kinetic, ros-indigo",
"url": null
} |
neural-network, deep-learning, loss-function
&= \frac{1}{2}\left[-\log{|\Sigma|} - n + \text{tr} \{ \Sigma \} + \mu^T \mu\right]\\
&= \frac{1}{2}\left[-\log\prod_i\sigma_i^2 - n + \sum_i\sigma_i^2 + \sum_i\mu^2_i\right]\\
&= \frac{1}{2}\left[-\sum_i\log\sigma_i^2 - n + \sum_i\sigma_i^2 + \sum_i\mu^2_i\right]\\
&= \frac{1}{2}\left[-\sum_i\left(\log\sigma_i^2 + 1\right) + \sum_i\sigma_i^2 + \sum_i\mu^2_i\right]\\
\end{align}
You see that the mean minimisation is the same so the only cost factor is between these stds and the covariance matrix values. We can see that its more expensive to evaluate these integrals in covariance matrix and then minimise them, then just to minimise these std.
TL;DR cheaper, but you are right it could be done. Good question! | {
"domain": "datascience.stackexchange",
"id": 6613,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-network, deep-learning, loss-function",
"url": null
} |
equations for the position of a rider who starts at time s = 0 seconds at the (right, left, top or bottom) and moves (clockwise or counter-clockwise). The solutions and answers are also provided. it supports reasoning about various properties of trigonometric functions such as periodicity and trigonometric equalities; it links with many circular motions in a real setting (motion of seats in a Ferris wheel or merry-go-round, movement of pedals and wheels of a bicycle, and so on). Solve trigonometric equations using a calculator. 157t— + 125 represents the height h, in feet, where tis measured in seconds. ) (-1, -2) is a point on the terminal side of an angle e in standard position. In the space below is a diagram. The circumference of a circle is calculated using the formula: 2 x π x radius, where π is a mathematical constant, equal to about 3. Precalculus — Trigonometry Review I) A ferris wheel is 40 meters in diameter and can be boarded from a 10 meter platform. The tangent of the | {
"domain": "climatecsas.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850847509661,
"lm_q1q2_score": 0.8275862358232395,
"lm_q2_score": 0.8418256452674009,
"openwebmath_perplexity": 697.3391188761855,
"openwebmath_score": 0.7487067580223083,
"tags": null,
"url": "http://climatecsas.it/laax/ferris-wheel-trig-calculator.html"
} |
algorithm-analysis, runtime-analysis, number-theory
Title: Runtime of Euclidean Algorithm Given two $n$-bits numbers $a$ and $b$, I am not sure on how to find the runtime of the euclidean algorithm for finding the $\gcd$ of $a,b$. The problem (for me) in here is that apart from the size of $a$ and $b$, I don't feel like I have any other information that will help me to know what is the runtime of the algorithm. I saw somewhere that the number of rounds is $\log_2 a = n$, but, assuming this is correct, I have no intuition as for why it is such?
My question is for an explanation to how much time it takes to calculate the $gcd$ (as a function of $n$)?
Is it linear in $n$? Let's analyze two consecutive steps of the GCD algorithm: given $a > b$, we compute $c = a \pmod{b}$ (replacing $a$) and $d = b \pmod{c}$ (replacing $b$). The two new numbers $c,d$ we are left with satisfy
$$ c+d \leq b \leq \frac{1}{2} (a+b). $$ | {
"domain": "cs.stackexchange",
"id": 3635,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm-analysis, runtime-analysis, number-theory",
"url": null
} |
electromagnetism, magnetic-fields, induction
Title: Where is the energy stored in an inductor? In an inductor,
Most text books say that the $(1/2)Li^2$ is stored in the magnetic field.
But is there another way to explain this?
In a capacitor I understand that all the energy that the battery provides is used up to seperate the two oppositely charged plates.
Is there an analogy for Inductors? OR Could you explain how energy can be stored in a
magnetic field? Does that mean energy is stored in an electric field produced by a point charge?
Does that mean energy is stored in an electric field produced by a
point charge?
The classical self energy of a point charge is formally infinite and, thus, somewhat of an embarrassment.
Could you explain how energy can be stored in a magnetic field? | {
"domain": "physics.stackexchange",
"id": 20106,
"lm_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, magnetic-fields, induction",
"url": null
} |
quadcopter, distributed-systems
A rule of thumb in multirotor design is that you should be able to hover at 50% throttle. This means that a quadcopter which can fly well at 1kg total weight will actually be able to get off the ground at around 2kg, but you'll have lost almost any ability to control attitude or position.
The winch is built from a servo and a fishing reel. Happy to provide more details.
https://youtu.be/wGwa2DG2Cs0 | {
"domain": "robotics.stackexchange",
"id": 703,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quadcopter, distributed-systems",
"url": null
} |
potential-energy, harmonic-oscillator, equilibrium, anharmonic-oscillators
And then, he reminded us the potential energy of Mass-Spring System and Simple Pendulum.
Potential energy stored in Mass-Spring System is $$U(x)=\frac{1}{2}C{x}^{2}$$ and in Simple Pendulum is $$U(\theta)=MgL=MgL(1-\cos{\theta})=MgL(1-[1-\frac{{\theta}^2}{2!}+\frac{{\theta}^4}{4!}-\dots])=MgL(1-[1-\frac{{\theta}^2}{2!}])=MgL\frac{{\theta}^2}{2}=\frac{MgL{\theta}^2}{2}$$
The purpose of this reminding was to explain that the potential energy stored in a harmonic oscillator system is proportional to the square of displacement of the body. And my teacher said that the $U(q)-q \text{(Potentional energy-displacement)}$ graphic is a parabola.
Then we discussed about a system that has a stable equilibrium point but not a harmonic oscillator. | {
"domain": "physics.stackexchange",
"id": 64703,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "potential-energy, harmonic-oscillator, equilibrium, anharmonic-oscillators",
"url": null
} |
circularly shifted$ k=2 $positions, while$ \{27, 29, 35, 42, 5, 15\} $has been shifted$ k=4 \$ positions. If only one array is supplied, SUMPRODUCT will simply sum the items in the array. C++ code to display contents of array. Find a Triplet having Maximum Product in an Array. Read 6 Integers from File, find sum, find average, and find Min/Max average. Write a program to find sum of each digit in the given number using recursion. Finding the Maximum value in an Array. Hi all, I'm looking for how to to the sum or union of two jagged array, I did it to simple array but do you have any idea how to do it for jagged array. For example, if an int. C Program to Find Maximum Element in Array - This program find maximum or largest element present in an array. We could also use other representations, such as an array containing two two-element arrays ([[76, 9], [4, 1]]) or an object with property names like "11" and "01", but the flat array is simple and makes the expressions that access the | {
"domain": "lampedusasiamonoi.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97594644290792,
"lm_q1q2_score": 0.8963875270376713,
"lm_q2_score": 0.9184802440252811,
"openwebmath_perplexity": 681.2426012969111,
"openwebmath_score": 0.3012574017047882,
"tags": null,
"url": "http://lampedusasiamonoi.it/yvgr/max-sum-of-2-arrays.html"
} |
c#, .net, calculator, wpf, xaml
if(!tb.Text.Contains(".")) States.hasDot = false;
break;
case Function.Clear:
tb.Text = "";
States.hasDot = false;
break;
}
} | {
"domain": "codereview.stackexchange",
"id": 15219,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, .net, calculator, wpf, xaml",
"url": null
} |
beginner, c, csv, converting
}
//go through vars and set meta
variable_t * current = variablesList;
current = current->next;
int i;
for(i = 0; i < count/3; ++i){
if(debug){
printOut("~~~Var Meta~~~", "", "magenta");
printOut("\n~~~Var Type: %s \n", intToStr32(current->type), "yellow");
}
current->measure = readInt32("~~~Var Measure:"); | {
"domain": "codereview.stackexchange",
"id": 40900,
"lm_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, csv, converting",
"url": null
} |
classification, cross-validation, matlab, terminology
hope it helps | {
"domain": "datascience.stackexchange",
"id": 3334,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classification, cross-validation, matlab, terminology",
"url": null
} |
special-relativity, relativity
The accuracy of an atomic clock depends on two factors. The first factor is temperature of the sample atoms—colder atoms move much more slowly, allowing longer probe times. The second factor is the frequency and intrinsic width of the electronic transition. Higher frequencies and narrow lines increase the precision.
From this talk which discusses gravitational red shift Atomic clocks versus atomic gravimeters I would expect that the answer would be yes, that temperature will have an effect on the measured timing of the clocks ( which is not exactly a decay or aging but an interesting effect).
The indiviual atoms/molecules have to have an internal "clock" for the whole sample to be "aging" faster , at 0 K. | {
"domain": "physics.stackexchange",
"id": 52229,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, relativity",
"url": null
} |
electrostatics, mathematical-physics, potential, curvature
Title: Curvature of electrostatic potential is zero Could you please expound upon this claim? I found such claim on Zangwill's Classical Electrodynamics, which states that constraint coming from Laplacian equation implies
electrostatic potential has zero curvature, and
is not bounded in at least one direction. | {
"domain": "physics.stackexchange",
"id": 16436,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, mathematical-physics, potential, curvature",
"url": null
} |
java, beginner, programming-challenge
/** This is a solution to
* https://www.hackerrank.com/challenges/torque-and-development/problem
* class must be name Solution to run on Hackerrank
*/
public class Solution {
private static List<List<Integer>> adjCities;
private static boolean[] visited;
// do a dfs to find every city that can be connected to any given group of cities
private static void dfs(int city){
visited[city] = true;
for (int c=0; c< adjCities.get(city).size(); c++){
if(!visited[ adjCities.get(city).get(c)]) {
dfs( adjCities.get(city).get(c) );
}
}
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
//Scanner in = new Scanner(new File("test_4.txt")); // sample input file
int queries = in.nextInt();
// loop through each of the blocks which represent separate problems
for(int cntQueries = 0; cntQueries < queries; cntQueries++){ | {
"domain": "codereview.stackexchange",
"id": 28484,
"lm_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, beginner, programming-challenge",
"url": null
} |
thermodynamics, energy, statistical-mechanics, pressure, temperature
Title: Extracting "useful" work from a free expansion? Suppose we have an adiabatic and isothermal free expansion of an ideal gas at temperature $T_0$ so that the gas incurs an increase in entropy
$$\Delta S_{sys}=Nk_B \ln\left(\frac{V_f}{V_i}\right)>0$$
The expansion occurs in adiabatic conditions so clearly $Q=0$. Also, the work done by the gas is $W=0$ because we are examining a free expansion into a vacuum. Thus we have that $\Delta U_{sys}=0$. This is all clear to me. The trouble begins when I calculate the change in helmholtz free energy $\Delta F$. The change in helmholtz free energy for this process is calculated as follows:
$$\Delta F=\Delta U -T\Delta S$$
$$\Rightarrow \Delta F_{sys}=0-T_0\cdot Nk_B \ln\left(\frac{V_f}{V_i}\right) $$
$$\therefore \Delta F_{sys}<0$$ | {
"domain": "physics.stackexchange",
"id": 76371,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, energy, statistical-mechanics, pressure, temperature",
"url": null
} |
Mark44
Mentor
I agree with @George Jones's comment in post #4.
(2) - (1) :
$cosh^2 t - sinh^2 t = 1$
$\frac{x^2}{4} - \frac{y^2}{4} = 1$
Take a closer look at the work I've quoted above.
$\frac{y^2}{4} - \frac{x^2}{4}$ forms a hyperbola and to graph it , we should go 2 units up from center point .
$cosh ( t)$ for $-\infty < t < \infty$ is always positive .
I agree with @George Jones's comment in post #4.
Take a closer look at the work I've quoted above.
$\frac{y^2}{4} - \frac{x^2}{4} = 1$
Mark44
Mentor
$\frac{y^2}{4} - \frac{x^2}{4} = 1$
Yes, that looks better.
George Jones
Staff Emeritus
Gold Member
$\frac{y^2}{4} - \frac{x^2}{4} = 1$ forms a hyperbola
Yes, a big hint is given by the names of the functions in the original equations.
Yes, that looks better.
Is it correct ?
#### Attachments | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305381464927,
"lm_q1q2_score": 0.8225148369748081,
"lm_q2_score": 0.8539127492339909,
"openwebmath_perplexity": 2634.2177248887165,
"openwebmath_score": 0.7986946105957031,
"tags": null,
"url": "https://www.physicsforums.com/threads/graph-the-cartesian-equation.956925/"
} |
Curves =-Area of region between f and g = Area of region under f(x)- Note that the two graphs switch at the origin. We restrict attention to non-wasteful allocations, namely those allocations which ex-haust total resources. 01 Exercises. This would make the integral in (b) an improper one. The upper and lower limits of integration for the calculation of the area will be the intersection points of the two curves. {And this sum equals to the length of major axis. equation in. Find the volume generated by revolving the first- and second-quadrant area bounded by. 2 π <θ Find the rate at which the distance between the two curves is changing with respect to θ. 1 Profit versus Revenue Maximization. What is the area of the. Then the area between the graphs can be found by subdividing the interval [c,d] on the y-axis, and using horizontal rectangular area elements. The more immediate problem is to find the inverse transform of the derivative. 8 of Text Book 1 (No Question to be set on Review of | {
"domain": "carlosfassanelli.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877717925421,
"lm_q1q2_score": 0.8250566284314385,
"lm_q2_score": 0.8499711775577736,
"openwebmath_perplexity": 601.1477546563357,
"openwebmath_score": 0.7026122808456421,
"tags": null,
"url": "http://vbsu.carlosfassanelli.de/area-between-two-curves-problems-and-solutions-pdf.html"
} |
= \frac {1}{a} ln |ax +b| + c$, $\int a^{bx+c} = \frac {1}{b} \frac {a^{bx+c}}{ log a} + C$, $\int \cos (ax+b) = \frac {1}{a} \sin (ax+b) + C$, $\int \sin (ax+b) = – \frac {1}{a} \cos (ax+b) + C$, $\int \sec^2 (ax+b) = \frac {1}{a} \tan (ax +b) + C$, $\int \csc^2 (ax+b) = – \frac {1}{a} \cot^2 (ax+b)+ C$, $\int \tan (ax+b) =- \frac {1}{a} ln |\cos (ax+b)| + C$, $\int \cot (ax+b) = \frac {1}{a} ln |\sin (ax+b)| + C$, $\int \sec (ax+b) =\frac {1}{a} ln |\sec (ax+b) + \tan (ax+b)| + C$, $\int \csc (ax+b) = \frac {1}{a} ln |\csc (ax+b) – \cot (ax+b)| + C$, B. Integration by parts intro. Important Forms to be converted into Special Integrals (i) Form I (ii) Form II. 17. Now let's use these ideas to study $\;\displaystyle\int\frac {e^x}x\,dx$. Interactive graphs/plots help visualize and better understand the functions. Integration by Parts Formulas . Can someone help me with the following proof: Integral of sqrt(a^2 - u^2) du = (1/2)((a^2 arsin(u/a) + (u) ISBN: 9781337275347. The Integral | {
"domain": "appanies.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517072737737,
"lm_q1q2_score": 0.808953791046555,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 1709.0699604763088,
"openwebmath_score": 0.8960931897163391,
"tags": null,
"url": "http://appanies.com/md7wf4/special-integration-formula-16ea79"
} |
c#, sqlite, mvvm, uwp, entity-framework-core
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite("Filename=mydbcontext.db");
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Person>().Property(p => p.Id).IsRequired();
modelBuilder.Entity<Person>().Property(p => p.Name).IsRequired();
}
}
Repository.cs
public class Repository
{
public List<Person> People()
{
using (var db = new MyDbContext())
{
return db.People.ToList();
}
}
public Person GetPersonByName(string name)
{
using (var db = new MyDbContext())
{
Person person = (from p in db.People
where p.Name == name
select p).FirstOrDefault();
return person;
}
}
} | {
"domain": "codereview.stackexchange",
"id": 27473,
"lm_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#, sqlite, mvvm, uwp, entity-framework-core",
"url": null
} |
statistical-mechanics, condensed-matter, superconductivity, bose-einstein-condensate, superfluidity
So anyway. Following the above, let's rephrase your question to How to observe off-diagonal long range order in a Bose-Einstein condensate?
Let's look at the asymptotic behaviour of the off-diagonal one-body density matrix, used in the Penrose-Onsager criterion as a rigorous definition for a BEC. In the first quantisation formalism, this is defined as:
\begin{equation}
\begin{gathered}
n^{(1)}(\mathbf{r}, \mathbf{r}') = \sum_i n_i\, \psi_i^\ast(\mathbf{r}) \psi_i(\mathbf{r}') \\ = n_0\,\phi_0(\mathbf{r})^\ast \phi_0(\mathbf{r}')+ \sum_{i\neq 0} n_i\, \psi_i(\mathbf{r})^\ast \psi_i(\mathbf{r}) \\ = n_0\, \phi_0(\mathbf{r})^\ast \phi_0(\mathbf{r}')+ \sum_{i\neq 0} n_i\, \mathrm{e}^{-\frac{\mathrm{i}}{\hbar}\mathbf{p}\cdot(\mathbf{r}-\mathbf{r}')},
\end{gathered}
\end{equation} | {
"domain": "physics.stackexchange",
"id": 69224,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, condensed-matter, superconductivity, bose-einstein-condensate, superfluidity",
"url": null
} |
the vertical velocity changes by 9.8 m/s each second and the horizontal velocity never changes. 53:54. The numerical information in both the diagram and the table above illustrate identical points - a projectile has a vertical acceleration of 9.8 m/s/s, downward and no horizontal acceleration. The vertical speed two seconds before reaching its peak is the same as the vertical speed two seconds after falling from its peak. A- at the base of the mast. Example: Moving water in a river. Suppose that the cannonball is launched horizontally with no upward angle whatsoever and with an initial speed of 20 m/s. he tangential acceleration can be found with this equation (I'll skip how I got it): University Physics Book: Calculus-Based Physics (Schnick) Volume A: Kinetics, Statics, and Thermodynamics ... One of the interesting things about projectile motion is that the horizontal motion is independent of the vertical motion. Horizontal Motion Definition In physics, the projectile motion is broken | {
"domain": "zoldterv.hu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018419665618,
"lm_q1q2_score": 0.8062108622714075,
"lm_q2_score": 0.8267117919359419,
"openwebmath_perplexity": 788.8755055509969,
"openwebmath_score": 0.38295450806617737,
"tags": null,
"url": "https://zoldterv.hu/lcdh7cxo/635482-vertical-movement-physics"
} |
electrostatics, potential, multipole-expansion
Q[L_, m_] := ((-1)^m SolidHarmonicR[L, -m, ##] & @@
r) q;(*Exterior multipole moment or order (L,m)*)
MatrixForm[
Table[Q[L, m], {L, 0, 5}, {m, -L, L}]]
rule = {R -> 1.2, q -> 2,
rtest -> 5.2, \[Theta]test -> 1.2, \[Phi]test -> 2.3};
Chop[Sum[SolidHarmonicI[L, m, rtest, \[Theta]test, \[Phi]test] Q[L,
m], {L, 0, 5}, {m, -L, L}] /. rule]
q/Norm[SphToCart@r -
SphToCart@{rtest, \[Theta]test, \[Phi]test}] /. rule | {
"domain": "physics.stackexchange",
"id": 12861,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, potential, multipole-expansion",
"url": null
} |
Alternative way to find the probability in die throw problem
We throw a die 10 times. What's the probability of getting at least one 6?
Using the complentary that's $$1-Pr$$(Getting no $$6$$'s)
$$1- ({\frac{5}{6}})^{10} = 0.838494$$
There's a note that says that to solve the problem directly would require a complex use of the additivity property.
a) How do you solve the problem directly?
I think that to solve it directly, though not sure, is to find the $$P(A_1 \cup A_2 \cup A_3 \cup A_4 \cup A_5 \cup A_6)$$ in ten die throws, where $$A_i$$ is the event of getting $$i$$ $$6$$'s
As the events $$A_i$$ are not disjoint the exclusion-inclusion principle is needed.
My try:
$$\binom{10}{1} \frac{1}{6} - \binom{10}{2} \frac{1}{6^2} + \binom{10}{3} \frac{1}{6^3} - \binom{10}{4} \frac{1}{6^4}+ \binom{10}{5} \frac{1}{6^5} - \binom{10}{6} \frac{1}{6^6} =0.838091$$
It is a slightly different result that the one obtained using the complementary. What am I not doing right? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109101320038,
"lm_q1q2_score": 0.8631972512368986,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 457.3737643169891,
"openwebmath_score": 0.7933527827262878,
"tags": null,
"url": "https://math.stackexchange.com/questions/3212748/alternative-way-to-find-the-probability-in-die-throw-problem"
} |
group-theory, lie-algebra
Then, by analogy, one can see, that the 3-rd and 8-th Gell-Mann matrices are considered "colorless" in QCD, so we need to use $\lambda_{15}$ in the linear combination.
At this point I'm stuck, by analogy one can continue that
$\left\{\lambda_9,\lambda_{10},..,\lambda_{14},x,y\right\}$.
With $x$ and $y$ being independent linear combinations of $\lambda_3$, $\lambda_8$ and $\lambda_{15}$, but I don't know how to prove it. You can do this by looking at the root diagrams of $su(3)$ and $su(4)$.
First, start with $su(2)$ inside $su(3)$. The root diagram of $su(3)$ is | {
"domain": "physics.stackexchange",
"id": 96105,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "group-theory, lie-algebra",
"url": null
} |
physical-chemistry, bond, hybridization, valence-bond-theory
Title: Why are the axial bonds of PF5 longer than those of the equatorial bonds? (Hybridization) The axial bonds of $\ce{PF5}$ are longer than those of the equatorial positions.
One explanation is that because the axial bonds are experiencing more repulsion
than those of the equatorial and this leads to longer bonds.
Another explanation is that the axial bonds of p/d hybrids, whereas the equatorial bonds are s/p hybrids.
I am able to comprehend and appreciate the first explanation. However, I am unable to understand how there are differences in the hybrids. I had always considered d hybrids a dubious argument at best, and I believed the hybridization would lead to degenerate orbitals.
However, the explanation provided would suggest otherwise, that there are different hybridized orbitals of different energies at different portions of a single hybridized atom (excluding lone pairs. I understand those being non-hybridized in a hybridized atom). | {
"domain": "chemistry.stackexchange",
"id": 3616,
"lm_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, bond, hybridization, valence-bond-theory",
"url": null
} |
path-integral, partition-function, regularization, qft-in-curved-spacetime, functional-determinants
$$\langle x| e^{t\Delta}|x\rangle=\frac{1}{4\pi t}\Big(1+O(t)\Big)$$
and substituting factorization (2) in equation (1) and first integrating over $t$ one gets
$$W=\frac{1}{8\pi}\int d^2z \sqrt{g} \int_{\Lambda^{-2}}^\infty \frac{dt}{t^2} e^{-tM^2}\left(1+O(t)\right)=\\\frac{1}{8\pi}\int d^2z \sqrt{g}\Big(\Lambda^2+M^2\log\frac{M^2}{\Lambda^2}+M^2(\gamma-1)\Big)+O\left(1\right)$$
And the $O(t)$ term translates into $O(1)$ in terms of $M$. To get the next orders of expansion one needs to use higher orders terms in the heat kernel expansion and also corrections to factorization (2). | {
"domain": "physics.stackexchange",
"id": 69184,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "path-integral, partition-function, regularization, qft-in-curved-spacetime, functional-determinants",
"url": null
} |
non-isomorphic 2. A short survey of Graph theory and chemistry have been successfully combined for a long time so solve chemistry-related tasks and problems. Anyway, graph spectral theory was used in chemistry some 10–20 years before any research in this area was done by mathematicians. Physicists, mechanical engineers, geographers, and programers of search engines all use results developed by spectral graph theory. The Divisor of a Graph. While the adjacency matrix depends on the vertex labeling, its spectrum is a graph invariant, although not a complete one. Applications of the theory of graph spectra to Chemistry and other branches of science are described from a mathematical viewpoint in Chapter 5. n Relations Between Spectral and Structural Properties of Graphs. In mathematics and computer science, graph theory is the study of graphs, which are mathematical structures used to model pairwise relations between objects from a certain collection.A "graph" in this context is a | {
"domain": "openquestionspodcast.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127409715956,
"lm_q1q2_score": 0.8125800017952117,
"lm_q2_score": 0.8221891392358014,
"openwebmath_perplexity": 1161.143805608858,
"openwebmath_score": 0.5253098607063293,
"tags": null,
"url": "http://openquestionspodcast.com/wearable-spy-dso/ccdba5-landlord-tenant-hotline-georgia"
} |
python, uniprot, embl
Which gives you a json dictionary
{ "results": [...], "failedIds": []}
Each entry in the result list is a dictionary similar to the following example
{
'from': 'P99999'\n\t
, 'to': {
'id': 'UniRef100_P99999'
, 'memberCount': 17
, 'representativeMember': {
'uniparcId': 'UPI000013EAA0'
, ...
}
, 'memberIdTypes': [
'UniProtKB Unreviewed (TrEMBL)'
, 'UniProtKB Reviewed (Swiss-Prot)'
]
, 'members': [
'P99999,0'
, 'Q6WUX8,0'
, 'P99998,0'
, 'Q5RFH4,0'
, 'G4XXL9,1'
, 'A0A2J8VDX6,1'
, 'K7CAI8,1'
, 'A0A663D840,1'
, 'G4XXM0,1'
, 'G4XXM2,1'
, 'G4XXM4,1'
, 'G1RY04,1'
, 'G4XXM3,1'
, 'G4XXM6,1'
, 'C9JFR7,1'
, 'A0A2J8VE06,1'
, 'A0A2J8KZC0,1'
]
, ...
}
} | {
"domain": "bioinformatics.stackexchange",
"id": 1567,
"lm_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, uniprot, embl",
"url": null
} |
# Max/min problem - show that diagonal is least when rectangle is a square.
A rectangle has constant area, show that the length of a diagonal is least when the rectangle is a square.
$$Area (a) = xy$$
$$y=\dfrac{a}{x}$$
$$D^2 = x^2 + y^2$$
$$D^2 = x^2 + (\dfrac{a}{x})^2$$
$$\dfrac{dD^2}{dx} = 2x - \dfrac{2a^2}{x^3}$$
$$2x - (\dfrac{2a^2}{x^3})=0$$
$$x=a^\dfrac{2}{4}$$
$$x=\sqrt{a}$$
$$\dfrac{d^2D^2}{dx^2}=2+\dfrac{6a^2}{x^4}$$
$$2+\dfrac{6a^2}{x^4}>0, minima$$
$$y=\dfrac{a}{\sqrt{a}}$$
$$y=\sqrt{a}$$
Is this correct? I'm assuming it is since the length of $x$ and $y$ are the same..sorry, I don't usually get these questions right and just wanted to make sure this is the way to do it.
Thank you. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631673242068,
"lm_q1q2_score": 0.8176347147463431,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 323.02119052459716,
"openwebmath_score": 0.9039506316184998,
"tags": null,
"url": "https://math.stackexchange.com/questions/1332486/max-min-problem-show-that-diagonal-is-least-when-rectangle-is-a-square"
} |
Why does the rank of $B+2I_3$ remain unchanged when it is multiplied by $S^{-1}$ and $S$?
4. This is because S, being invertible, has full rank.
Qualitatively speaking, multiplying a matrix by a full rank matrix corresponds to a sequence of row or column operations.
More explicitly, the rank of an n by n matrix is n-k where k is the dimension of the kernel, right?
Well if A is rank n, B has rank r, then the kernel of B lies in the kernel of AB right? (Bx=0 implies ABx=A(0)=0).
Furthermore, no additional vectors can map to zero by A (ABx=0 implies Bx=0).
Thus the kernel is in fact the same, and the rank of AB is the rank of B.
A similar argument yields the same thing for multiplication on the right by a full rank matrix.
Therefore what we are using is that the rank of $MAN$ equals the rank of $A$ for any choice of full rank matrices M,N.
Does that clarify the argument? | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357211137666,
"lm_q1q2_score": 0.8026420679501768,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 265.9386656042507,
"openwebmath_score": 0.9196047782897949,
"tags": null,
"url": "http://mathhelpforum.com/advanced-algebra/77314-similar-matrices.html"
} |
c, a-star
list->size -=1;
return;
}
}
}
int nodelist_index(NodeList list, Node node)
{
for(int i = 0; i < list.size; i++)
{
if (coordinates_equals(list.nodes[i]->coordinates, node.coordinates))
{
return i;
}
}
return ERROR;
}
bool nodelist_is_empty(NodeList list)
{
return list.size == 0;
} | {
"domain": "codereview.stackexchange",
"id": 26074,
"lm_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, a-star",
"url": null
} |
fft, power-spectral-density, qpsk
So the answer is to understand first what is the longest possible run of symbols that would not change in the receiver and then choose a loop bandwidth that minimizes the amount of symbol energy lost over that time interval, while ensuring the bandwidth is fast enough to track changing conditions and minimizing noise from low frequency sources such as phase noise.
As a rough measure of the impact of a loop BW using a loop BW of $R/20$, where $R$ is the symbol rate, consider that the single sided bandwidth of a properly pulse shaped waveform is slightly over $R/2$. If the loop BW was $R/20$ the SNR loss would approximately be 0.46 dB from tracking loss alone:
$$10log_{10}\bigg(1-\frac{R/20}{R/2}\bigg) =10log_{10}(0.9) = -0.46 dB $$ | {
"domain": "dsp.stackexchange",
"id": 8574,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, power-spectral-density, qpsk",
"url": null
} |
c#, .net
public Customfield customfield_13319 { get; set; }
public Customfield customfield_11812 { get; set; }
public string customfield_13318 { get; set; }
public string customfield_11811 { get; set; }
public string customfield_10728 { get; set; }
public List<string> subtasks { get; set; }
public string customfield_10041 { get; set; }
public string customfield_13311 { get; set; }
public string customfield_13310 { get; set; }
public string customfield_13313 { get; set; }
public string customfield_13312 { get; set; }
public string customfield_13315 { get; set; }
public string customfield_13314 { get; set; }
public Customfield customfield_10710 { get; set; }
public string customfield_10712 { get; set; }
public Issuetype issuetype { get; set; }
public string customfield_14510 { get; set; }
public Project project { get; set; }
public string customfield_12210 { get; set; }
public string customfield_15600 { get; set; } | {
"domain": "codereview.stackexchange",
"id": 28917,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, .net",
"url": null
} |
ros, microcontroller, ros-melodic, ros-control, diff-drive-controller
What could possibly be happening? I understand that I have to play with the wheel separation multiplier because of the skid steer nature of the robot vs differential style, but the radius multiplier should stay at 1? I have checked my urdf and hardware interface and don't think they're the issue but anything I should look for?
Here's my diff drive config file:
robot_joint_publisher:
type: "joint_state_controller/JointStateController"
publish_rate: 100 | {
"domain": "robotics.stackexchange",
"id": 35505,
"lm_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, microcontroller, ros-melodic, ros-control, diff-drive-controller",
"url": null
} |
navigation, turtlebot, ros-electric, gmapping, amcl
If you are unfamiliar with the TF library, you should read through the tutorials.
Originally posted by Eric Perko with karma: 8406 on 2012-04-16
This answer was ACCEPTED on the original site
Post score: 7 | {
"domain": "robotics.stackexchange",
"id": 8971,
"lm_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, turtlebot, ros-electric, gmapping, amcl",
"url": null
} |
c++, state-machine, sfml, entity-component-system, pong
Body_Builder& set_angular_velocity(const float& velocity) {
body_definition.angularVelocity = velocity;
return *this;
};
Body_Builder& set_angular_damping(const float& damping) {
body_definition.angularDamping = damping;
return *this;
};
Body_Builder& set_gravity_scale(const float& scale) {
body_definition.gravityScale = scale;
return *this;
};
Body_Builder& set_allow_sleep(const bool& is_allowed_sleep) {
body_definition.allowSleep = is_allowed_sleep;
return *this;
};
Body_Builder& set_awake(const bool& is_awake) {
body_definition.awake = is_awake;
return *this;
};
Body_Builder& set_fixed_rotation(const bool& is_rotation_fixed) {
body_definition.fixedRotation = is_rotation_fixed;
return *this;
};
Body_Builder& set_bullet(const bool& is_bullet) {
body_definition.bullet = is_bullet;
return *this;
}; | {
"domain": "codereview.stackexchange",
"id": 42092,
"lm_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++, state-machine, sfml, entity-component-system, pong",
"url": null
} |
calibration, turtlebot, ros-electric
When I got the turtlebot to face the wall correctly during the procedure, it wasn't at the end and vice versa. (The factor proposed by the calibration would work opposite the statement of the tutorial - Overrotating and a factor greater 1)
Therefore my question is: Is the stop at the end of the procedure also important? Am I doing something wrong?
Another probably important information: I changed the position of the kinect on the turtlebot from the back to the front (Because I also wanted to mount an arm on the middle platform). For that I changed the urdf file as well as the turtlebot_calib_cam_x value under turtlebot_description/turtlebot_calibration.xacro.
Originally posted by Fabian Saccilotto on ROS Answers with karma: 51 on 2012-12-19
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 12160,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "calibration, turtlebot, ros-electric",
"url": null
} |
c++, recursion, lambda, c++20
auto out = something_something_get_output_iterator(output);
std::ranges::transform(
std::forward<Range>(input),
out,
[&f](auto&& element) { return recursive_transform(element, f); }
);
return output;
}
And the only “tricky” parts that vary between the functions are:
the something_something_recursively_indirectly_unary_invocable concept
the something_something_result_type type trait; and
the something_something_get_output_iterator function.
The latter two are pretty easy to figure out. The first will take a bit more work—at a single level of recursion it’s just indirectly_unary_invocable<ranges::iterator_t<Range>>, but we need a recursive version. But I think that’s all worth doing, because it means that all you’d need for recursive_transform() is the function above and the non-range one you’ve already written:
template <typename T, std::invocable<T> F>
constexpr auto recursive_transform(const T& input, const F& f)
{
return f(input);
} | {
"domain": "codereview.stackexchange",
"id": 40197,
"lm_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++, recursion, lambda, c++20",
"url": null
} |
java, algorithm, sorting, heap-sort
why do heapify()s start at the middle of the array?
what is to be gained from not comparing the item to be (re-)inserted while there are two children?
Continue with coding: e.g., there are several instances where you exchange/swap elements: "factor out" a method/procedure
handle petty concerns last, if at all:
Java arrays & java.util.Arrays don't come with a swap()? Use java.util.Collections.swap(java.util.List, int, int) as a template
using a for-loop:
for (int index = i, parent ; index != 0 ; index = parent) {…
Just in case:
/** Rearranges items in ascending "natural" order. */
interface In_placeSorter<T> extends java.util.function.UnaryOperator<T> {
/** Rearranges items in ascending "natural" order.
* @param toBeSorted items to be sorted
* @return <code>toBeSorted</code> */
T sort(T toBeSorted);
@Override
default T apply(T t) { return sort(t); }
} | {
"domain": "codereview.stackexchange",
"id": 28865,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, algorithm, sorting, heap-sort",
"url": null
} |
turtlebot, ros-crystal
Title: Is it possible to use turtlebot 2 with crystal?
Hello! I saw that there are not turtlebot debian packages for the crystal release. Is it possible to build it from source for crystal?
Originally posted by pantphotiou on ROS Answers with karma: 11 on 2019-01-31
Post score: 1
It depends.
If you're using the ROS1 bridge to the navigation stack, 100% absolutely. If you're talking about navigation2, its still highly experimental and not really stable enough for a typical user to treat it like a black box solution.
Originally posted by stevemacenski with karma: 8272 on 2019-01-31
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by pantphotiou on 2019-01-31:
Thank you!
Comment by stevemacenski on 2019-01-31:
If that answers, can you click the checkbox so it goes off everyone's unanswered questions queue? | {
"domain": "robotics.stackexchange",
"id": 32384,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turtlebot, ros-crystal",
"url": null
} |
observational-astronomy, asteroids, radar
Could someone help me out here? Is one axis delay (time) and the other doppler shift? One can start with this description but there is more to it than is discussed there.
below: "A radar image shows asteroid 3122 Florence and tiny echoes from its two moons. Here is an animation that shows them more clearly. The direction of the radar illumination (and thus the direction toward Earth) is at the top." From here. NASA / Jet Propulsion Laboratory. This is a small subset of the frames contained in the original 36 MB GIF, and the size has been decreased by a factor of 2 in order to fit in SE's 2 MB limit. The vertical axis is signal delay, and therefore distance from the radar antenna; this is more or less true spatial information. As the caption indicates, delay is increasing from top to bottom in the image. | {
"domain": "astronomy.stackexchange",
"id": 2455,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "observational-astronomy, asteroids, radar",
"url": null
} |
r, sequence-alignment, bioconductor
M -0.6666667 -0.6666667 -0.8333333 -0.8333333 -0.75
R -0.6666667 -0.8333333 -0.6666667 -0.8333333 -0.75
W -0.8333333 -0.6666667 -0.6666667 -0.8333333 -0.75
S -0.6666667 -0.8333333 -0.8333333 -0.6666667 -0.75
Y -0.8333333 -0.6666667 -0.8333333 -0.6666667 -0.75
K -0.8333333 -0.8333333 -0.6666667 -0.6666667 -0.75
V -0.6666667 -0.7777778 -0.7777778 -0.7777778 -0.75
H -0.7777778 -0.6666667 -0.7777778 -0.7777778 -0.75
D -0.7777778 -0.7777778 -0.6666667 -0.7777778 -0.75
B -0.7777778 -0.7777778 -0.7777778 -0.6666667 -0.75
N -0.7500000 -0.7500000 -0.7500000 -0.7500000 -0.75 | {
"domain": "bioinformatics.stackexchange",
"id": 2486,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "r, sequence-alignment, bioconductor",
"url": null
} |
neural-networks, reinforcement-learning, python, q-learning, keras
This can be a factor that makes learning harder.
It can take 100+ frames to get to the food, so maybe this isn't registering well with the neural network.
100 time steps delay between rewards is not much for DQN. It should be correctly predicting Q values - it will just take more episodes to learn to predict the best movement when the food is further away. | {
"domain": "ai.stackexchange",
"id": 1301,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, reinforcement-learning, python, q-learning, keras",
"url": null
} |
two inputs) are connected to the NOR gate as shown in fig. Do this for Z, the output of problem 2d. logic gates are fundamental building blocks of the digital system. The app provides for the entry of three variables ( a,b,c ), three oper…. The last two are not standard terms; they stand for \inverter" and \bu er", respectively. Truth table - A truth table is used in logic to compute the functional values of logical expressions on each combination of values taken by their logical variables. This needs to be done for each of the four integrated circuits (ICs) (chips). Truth Table Circuit Calculator. one of its input is at logic 0 state. They give what are called "necessary and sufficient" conditions, and give completely equivalent and hopefully interesting new ways to say exactly the same thing. Then develop the minimum sum of products form. An OR gate with a NOT in both inputs is equivalent to a NAND. Three Input AND Gate. Boolean Equation,Truth Table and Logic Program HELP: PLC | {
"domain": "cloudscuola.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464485047916,
"lm_q1q2_score": 0.8132801752066438,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 795.8803509624115,
"openwebmath_score": 0.6178021430969238,
"tags": null,
"url": "http://cloudscuola.it/sgxh/truth-table-logic-gates-calculator.html"
} |
dimensional-analysis, perturbation-theory
you end up with a dimensionless r.h.-side parenthesis,
$$ \left (\frac{f_1}{6\pi \epsilon } + \tilde g(1,\tilde h, \tilde R) ~f_2 \right ). $$
You might experiment with simple notional example functions to appreciate the logic of the scaling.
If, indeed, you need to expand in terms of ε and not 1/ε, the form of the equation is unforgiving, and multiplying the equation by ε merely dictates excessive dominance of the of the first term to zeroth order, leading to its vanishing. But this non-dimensionalization is unique, given your desiderata. Perhaps you wish to modify them by, e.g., measuring lengths in units of a, instead. | {
"domain": "physics.stackexchange",
"id": 55185,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dimensional-analysis, perturbation-theory",
"url": null
} |
electromagnetism, gauss-law
Gauss's law says that the net electric flux through a closed surface due to a charge $q$ is $\Phi_E = q/\epsilon_0$ if the charge lies inside the surface, and $\Phi_E = 0$ if the charge lies outside the surface. So Gauss's Law does "account for" both charges inside and outside the surface, in the sense that it gives an accurate result whether or not there are additional charges outside the surface. The reason that there is no net flux from a charge outside the surface is that such a charge gives rise to equal amounts of positive flux on one portion of the surface and negative flux on other portions of the surface. | {
"domain": "physics.stackexchange",
"id": 94583,
"lm_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, gauss-law",
"url": null
} |
homework-and-exercises, newtonian-mechanics, energy, momentum, collision
But the solution makes no sense. Can anybody explain this?
The example is the following. The mass of the ball is 1 kg and its speed is 5m/s, the speed of the wall is 1m/s. Find the speed of the ball after the ball hits
the wall(the collision is perfectly elastic) Can anybody explain this? Formulas do make perfect sense with the right approach. Consider $m_1$ is the mass of the ball and $m_2$ is the mass of the wall. What makes a moving wall a wall is that its mass is way greater than ball: $m_2\gg m_1$. We can rewrite formulas in terms of mass ratio $\frac{m_1}{m_2}$:
$$
v_1 = \frac{\frac{m_1}{m_2} - 1}{\frac{m_1}{m_2}+1}u_1 + \frac{2}{\frac{m_1}{m_2}+1}u_2,\qquad
v_2 = \frac{2\frac{m_1}{m_2}}{\frac{m_1}{m_2}+1}u_1 + \frac{1 - \frac{m_1}{m_2}}{\frac{m_1}{m_2}+1}u_2.
$$
Now if we consider the limit $\frac{m_1}{m_2} \to 0$, then the formulas become:
$$
v_1 = 2u_2 - u_1,\qquad v_2 = u_2
$$
How can we check the result with common sense? | {
"domain": "physics.stackexchange",
"id": 79018,
"lm_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, energy, momentum, collision",
"url": null
} |
planet, amateur-observing
Any telescope can in theory achieve an unlimited magnification. But in practice, its magnifying power is limited by the amount of light the telescope is taking in, which is to say, its aperture. The telescope is only collecting so much light. Every increase in magnification is zooming in on a smaller and smaller area, which means it is looking at a smaller and smaller fraction of the original amount of light.
On your telescope, the aperture is 70mm. This is the main thing that dictates how bright of an object you can hope to see at the eyepiece. There is another stat that is important to figuring out what eyepieces are likely to show you, though, and that is the telescope's focal length. Your scope has a 400mm focal length. Total magnification is the focal length of the telescope divided by the focal length of the eyepiece.
Your telescope came with two eyepieces:
400mm (telescope focal length) / 20mm (eyepiece focal length) = 20x magnification | {
"domain": "astronomy.stackexchange",
"id": 1668,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "planet, amateur-observing",
"url": null
} |
python, parsing, configuration
elif type == self.FE_TYPE:
regressor_matrix=[['0' for col in range(int(count)+1)] for row in range(len(ev_names)+1)]
self.fill_matrix(evg_lines,regressor_matrix,5, 0)
for i in range(1,len(ev_names)+1):
ind=str(i)
regressor_matrix[i][0]=ev_names[ind]
for i in range(1,int(count)+1):
ind=str(i)
regressor_matrix[0][i]=ind
return analysis_name,output_path,feat_paths,count,design_matrix,regressor_matrix,ev_names,cope_names,first_example_dir Your function acts widely different depending on the value of the type parameter. In fact, it basically acts like different functions depending on that parameter. It returns completely different sets of values depending on the value of type. The function would be better off split into several functions, one for each type. Then each function would be simpler, and easier to follow. | {
"domain": "codereview.stackexchange",
"id": 1798,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, parsing, configuration",
"url": null
} |
digital-communications
Title: Why are QAM Constellations regular and rectangular? In most IQ graphs of QAM noise, it seems like the constellation ends up with more distortion the farther you get from the center: | {
"domain": "dsp.stackexchange",
"id": 3960,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "digital-communications",
"url": null
} |
line and proving that the triangles are congruent. Parallel Lines Transversals Angle. - Get the answer to this question and access a vast question bank that is tailored for students. Prove that A quadrilateral is a parallelogram if one pair of opposite sides are equal and parallel. In any case, in a parallelogram, the opposite angles are always equal. Yes if diagonals of a parallelogram are equal then it is a rectangle. Given, opposite angles of a quadrilateral are equal. Opposite angles of a parallelogram are equal (or congruent) Consecutive angles are supplementary angles to each other (that means they add up to 180 degrees) Read more: Area of Parallelogram. There can be more than one community in a society. Click hereto get an answer to your question ️ Prove that in a parallelogram the opposite angles are equal . Area = base $$\times$$ height = b $$\times$$ h. It includes every relationship which established among the people. A parallelogram has two parallel pairs of opposite sides. | {
"domain": "eventfullevents.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9697854146791214,
"lm_q1q2_score": 0.8705718084111486,
"lm_q2_score": 0.8976952996340946,
"openwebmath_perplexity": 507.28567752899374,
"openwebmath_score": 0.6664319038391113,
"tags": null,
"url": "http://eventfullevents.com/swamp-animals-ujouar/de8a57-prove-that-opposite-angles-of-a-parallelogram-are-equal"
} |
qiskit, circuit-construction, textbook-and-exercises
Title: Creating a Qiskit Circuit sending $|00\rangle$ to $|1,-\rangle$ and $|11\rangle$ to $|0,-\rangle$ I am trying to create a circuit in Qiskit that performs the following transformations:
starting in state |00⟩ generates a √(2)/2 * (-|10⟩+|11⟩) state
starting in state |11⟩ generates a √(2)/2 * (|00⟩-|01⟩) state
I created a basic circuit for creating entangled states but I do not know how to infer relevant gates for such transformations.
def create_circuit():
qr3 = qiskit.QuantumRegister(2)
cr3 = qiskit.ClassicalRegister(2)
qc3 = qiskit.QuantumCircuit(qr3 ,cr3)
qc3.h(qr3[0]) # H
qc3.cx(qr3[0], qr3[1]) # CNOT | {
"domain": "quantumcomputing.stackexchange",
"id": 3704,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "qiskit, circuit-construction, textbook-and-exercises",
"url": null
} |
homework-and-exercises, electrostatics, charge, potential, multipole-expansion
To write down the multipole expansion, you just need to write down the Taylor expansion of the potential around $1/r$, with $r = \sqrt{x^2+y^2+z^2}$. This gives that any expression of the form:
$$\lim_{r\to\infty}\frac{1}{\sqrt{r^2+b}}= \frac{1}{r} - \frac{b}{2r^3} + \frac{3b^2}{8r^5} + \cdots$$
You can then use this expansion on the components of the potential to get your result. | {
"domain": "physics.stackexchange",
"id": 28711,
"lm_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, electrostatics, charge, potential, multipole-expansion",
"url": null
} |
If F does not contain s , ilaplace uses the function symvar. 5 1 A fundamental and three odd harmonics (3,5,7) fund (freq 100) 3rd harm. Expression; Equation; Inequality; Contact us. It can be derived in a rigorous fashion but here we will follow the time-honored approach. Transform 2-D optical data into frequency space. We will also use resources from the web. and the distribution for each is 2p(2x)= 2 π(1+ (2x)2). Develop a set of known Fourier transform pairs. l d f ti ti. Consider this Fourier transform pair for a small T and large T, say T = 1 and T = 5. pdf from MEC 411 at Stony Brook University. Fourier Transform and Spectrum Analysis Discrete Fourier Transform • Spectrum of aperiodic discrete-time signals is periodic and continuous • Difficult to be handled by computer • Since the spectrum is periodic, there's no point to keep all periods - one period is enough • Computer cannot handle continuous data, we can. The filter’s amplitude spectrum tells us how each signal frequency | {
"domain": "leckerefelsen.de",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429120895838,
"lm_q1q2_score": 0.8007091966034915,
"lm_q2_score": 0.8128673246376009,
"openwebmath_perplexity": 765.7105353484437,
"openwebmath_score": 0.7930785417556763,
"tags": null,
"url": "http://nvxu.leckerefelsen.de/inverse-fourier-transform-examples-and-solutions-pdf.html"
} |
Note that this is also the natural response of the circuit because the application of an impulsive source is equivalent to instantaneously storing energy in the circuit. Moments of the impulse response are widely used for interconnect timing analysis, from the explicit Elmore delay (the first moment of the impulse response) expression, to moment matching methods which creates reduced order trans-impedance and transfer function. Resistors are simple circuit elements. What is the response function of the circuit in the s-domain? 2. I have to find the impulse response of an RC circuit (c up ). If you apply a unit step to a circuit and get 3. The RC step response is a fundamental behavior of all digital circuits. 2, the energy stored in an inductor is , and the power dissipated in a resistor is p = Ri 2. Lecture 3 -Transient Response and Transforms The filters so far considered (Butterworth, Chebyshev and elliptic) were designed with only the amplitude response in mind; the impulse response | {
"domain": "hotrodsmc.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808753491772,
"lm_q1q2_score": 0.8014526275435109,
"lm_q2_score": 0.8175744806385542,
"openwebmath_perplexity": 997.9841681574762,
"openwebmath_score": 0.5418322086334229,
"tags": null,
"url": "http://hotrodsmc.it/qvjk/impulse-response-of-rc-circuit.html"
} |
python, beginner, object-oriented, linked-list, homework
def DisplayBook(self):
curr = self.head
while curr:
print(curr.getId(),curr.getBookName(),curr.getAuthorName())
curr = curr.getNextNode()
def RemoveBookAtPosition(self,n):
prev = None
curr = self.head
curPos = 0
while curr:
if curPos == n:
if prev:
prev.setNextNode(curr.getNextNode())
else:
self.head = curr.getNextNode()
self.size = self.size - 1
return True
prev = curr
curr = curr.getNextNode()
curPos = curPos + 1
return False | {
"domain": "codereview.stackexchange",
"id": 29117,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, object-oriented, linked-list, homework",
"url": null
} |
Now if \displaystyle \begin{align*} t = 200 \end{align*}, that gives
\displaystyle \begin{align*} R(200) &= 2^{-\frac{200}{1600}}\,R_0 \\ &= 2^{-\frac{1}{8}}\,R_0 \\ &\approx 0.917 \, R_0 \end{align*}
So what percentage of the original amount do you have? | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806484125338,
"lm_q1q2_score": 0.8536908405465717,
"lm_q2_score": 0.8705972751232808,
"openwebmath_perplexity": 1667.1023268420893,
"openwebmath_score": 1.0000100135803223,
"tags": null,
"url": "https://mathhelpboards.com/threads/d-e-word-problem.9047/"
} |
arrays, randomized-algorithms
I'm looking for an algorithm that can help me solve the above problem. This is part of a real-world application UI and as a result, it'd be best if it doesn't take more than a second to calculate the set of 5. Anything longer than a second is bad. Even a second is too long.
If anyone has a solution that takes up to a minute or so, I might be able to do some pre-processing on the data so I am still open to it. I would like you to note that the selection cannot be fully random.. Assume there are 10 total images.
5 have the same tags
5 have a single but unique tag
Then the algorithm will Always choose the same 5 images (And will Always skip the other 5 images).
Luckily there's an algorithm that can help you easily. Note that this algorithm skips points 4/5 (which you claim are optional).
Foreach image => sort its tags alphabetically
Find the longest tag
Postfix the same letter to all the tags in order to make them the same lenght | {
"domain": "cs.stackexchange",
"id": 8121,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "arrays, randomized-algorithms",
"url": null
} |
html, css
<div id="columns">
<div id="col1">col1</div>
<div id="col2">col2</div>
<div id="col3">col3</div>
</div>
</div>
<div id="content">content</div>
<div id="sidebar">sidebar</div>
</div>
<div id="footer">footer</div> | {
"domain": "codereview.stackexchange",
"id": 366,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "html, css",
"url": null
} |
physical-chemistry, molecules, dipole
Two equal and opposite vectors do not cancel each other out when acting on different bodies.
My best attempt to resolve this contradiction:
Since in reality it is the case that the net polarity of $\ce{CO_2}$ is null, I think that both vectors (viz., the 'pull' from both oxygen atoms) must be acting individually on all electrons of carbon atom and therefore they cancel each other out resulting in molecule to be non-polar on whole. This explanation isn't all that satisfying to me, however. Your confusion appears to arise from trying to consider dipole vectors as representing forces, which is incorrect.
Dipole vectors don't "act on" anything; they describe the displacement of the "center-of-charge"‡ of a given region of space (including both the electron cloud and the nuclei) from a particular reference point. In particular, I believe you are confusing dipole moment vectors with electric field vectors: | {
"domain": "chemistry.stackexchange",
"id": 5342,
"lm_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, molecules, dipole",
"url": null
} |
python, validation
self.n_bins = n_bins
self.space_size = np.product(n_bins)
temp = (1,) + n_bins[:-1]
self.cumprod = np.cumprod(temp)
def transform(self, input_vector):
if not check_container(input_vector, tuple, len(self.n_bins)):
raise TypeError("input_vector should be a tuple of the same length as n_bins")
return self._convert(input_vector)
def _convert(self, input_vector):
num = 0
for i, bin in enumerate(input_vector):
num += bin * self.cumprod[i]
return num | {
"domain": "codereview.stackexchange",
"id": 43126,
"lm_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, validation",
"url": null
} |
Since I didn't use Axiom II (associativity), my answer to the request "State explicitly the stronger result that you actually proved" is "The non-equivalence of + and * is not dependent on associativity holding in the system F." Is that a good answer to the meaning of the very last sentence of the problem? – mring Jun 5 '12 at 16:42
@Pete Close, though I would make it clear that it does still require Axioms I and III, e.g. (though this is awkward) '+ and * are non-equivalent in each system with commutativity and existence of identities, regardless of associativity'. – Steven Stadnicki Jun 5 '12 at 17:04 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241991754918,
"lm_q1q2_score": 0.8505594812151208,
"lm_q2_score": 0.8774767842777551,
"openwebmath_perplexity": 515.8939852046161,
"openwebmath_score": 0.856543242931366,
"tags": null,
"url": "http://math.stackexchange.com/questions/154310/why-would-the-author-ask-if-i-used-the-associative-law-to-prove-is-not-equiv"
} |
condensed-matter, research-level, quantum-hall-effect, topological-order, topological-insulators
Title: Simple models that exhibit topological phase transitions There are a number of physical systems with phases described by topologically protected invariants (fractional quantum Hall, topological insulators) but what are the simplest mathematical models that exhibit topological phases? Is the toric code as simple as we can go?
Edit: Just to be clear, I'm talking about phases meaning states of matter, and not just the geometric phase that a wavefunction will pick up under parallel transport in a nontrivial configuration space. I'm looking for simple models where one can make a phase diagram, and as a function of the available couplings there is a change in some topological property of the system. | {
"domain": "physics.stackexchange",
"id": 4817,
"lm_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, research-level, quantum-hall-effect, topological-order, topological-insulators",
"url": null
} |
c#, algorithm, strings, programming-challenge
for (int i = 0; i < n; i++)
{
char c = input[i];
a[indexOf(c)]++;
Debug.Assert(indexOf(c) != -1); // add postcondition assertions
}
int ans = Int32.MaxValue;
// two pointers: left and right, both go through O(n) time
int left = 0;
for (int right = 0; right < n; right++)
{
char c1 = input[right];
a[indexOf(c1)]--;
while (valid(n, a) &&
left <= right)
{
ans = Math.Min(ans, right - left + 1);
char c2 = input[left];
a[indexOf(c2)]++;
left++;
}
}
return ans;
} | {
"domain": "codereview.stackexchange",
"id": 23139,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, algorithm, strings, programming-challenge",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.