text stringlengths 1 1.11k | source dict |
|---|---|
organic-chemistry, heat, combustion
Can anyone explain why?
If you think about it, without having the data of the heat of combustion of each type of bond, you can't really answer this question. I know that cyclopropane has a higher heat of combustion per bond than cyclobutane. However, that, in my sense of viewing the problem, does not prevent the fact ethylcyclobutane could have a higher heat of combustion as it is a cycloalkane with 4 bonds rather than 3.
It could happen that the three bonds in cyclopropane and the three bonds in the alkyl branch are lower in energy that the four bonds in cyclobutane and the two bonds in the alkyl branch.
For example:
Let's say a cyclopropane C−C bond is 10 J.
A cyclobutane C−C bond is 9.5 J.
A regular alkane bond is 8 J.
For propylcyclopropane:
Total energy is 54 J
For ethylcyclobutane:
Total energy is 54 J
The same! I know this sounds really simplistic and dumb, but I just don't understand how you can assume the answer is A. | {
"domain": "chemistry.stackexchange",
"id": 1951,
"lm_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, heat, combustion",
"url": null
} |
quantum-mechanics, soft-question, education
QP2: https://www.youtube.com/watch?v=QI13S04w8dM&list=PLUl4u3cNGP60QlYNsy52fctVBOlk-4lYx&index=2
QP3: https://www.youtube.com/watch?v=_OZXEb8FxZQ&list=PLUl4u3cNGP60Zcz8LnCDFI8RPqRhJbb4L&index=2
Some of that content will have been covered in the first course you took and some not, according to the description I see of the course you linked. You would have to outline the MIT content and choose which of it is new to you. The courses are real Quantum Mechanics courses at MIT.
I'd like to refer you to one more source if you want to understand quantum mechanics from its foundations up, which is Shankar's Principles of Quantum Mechanics. It is one of the most common graduate-level Quantum Mechanics textbooks. It is not too hard to find a PDF online. You could use it as a reference on the side with the MIT course. The most important chapters here are chapters 1 and 4. | {
"domain": "physics.stackexchange",
"id": 91960,
"lm_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, soft-question, education",
"url": null
} |
automata, nondeterminism, applied-theory
Sometimes non-determinism is an effective mechanism for describing some complicated problem/solution precisely and effectively, for an example non-deterministic machines can serve as model of search-and-backtrack algorithm (read: How string process in non-deterministic model using backtrack). Oppositely deterministic models better represents efficient, minimized and less-redundant solutions.
Here I would also like to quote from Wikipedia Use of Nondeterministic algorithm: | {
"domain": "cs.stackexchange",
"id": 4010,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "automata, nondeterminism, applied-theory",
"url": null
} |
electromagnetism, statistical-mechanics, magnetic-fields, material-science, magnetic-moment
Title: What determines if magnetic spins align parallel or anti parallel in a material? As we all know, the magnetic field around a dipole looks like the following:
Notice how, directly above and below the magnet, the magnetic fields likes are parallel to the north-south axis. However, to the sides of the magnet, the magnetic field lines are anti parallel. If you've ever played with a magnet, you know that magnets, when placed end-to-end, like to align parallel, but when placed side by side like to align anti-parallel:
Now let's zoom into some magnetic material. It's made up of a bunch of elementary magnetic spins. Given the direction of the magnetic field lines, it's not clear which is more energetically favorabe: for all spins to point in the same direction, or for them to "flip" in a checkerboard pattern: | {
"domain": "physics.stackexchange",
"id": 67915,
"lm_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, statistical-mechanics, magnetic-fields, material-science, magnetic-moment",
"url": null
} |
gravity, torque, mass
$6A × g × 4 + 29A × g × x = 35A × g × 2.5$
Here A is mass per unit area, 4 is the x coordinate of centre of mass of small cut off block, x is the coordinate of centre of mass of left over block and 2.5 is the coordinate of original block
We have equate the combined torque of cut off and left off pieces with that of original piece, you can do similar operation for y coordinate
$6A × g × 5.5 + 29A × g × y = 35A × g × 3.5$
These operations give the same results as those obtained by method 1, so there is no error. | {
"domain": "physics.stackexchange",
"id": 11302,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, torque, mass",
"url": null
} |
programming-languages, type-theory, polymorphisms
Thanks.
11 Simple Extensions
11.12 Lists
The typing features we have seen can be classified into base types like
Bool and Unit, and type constructors like → and × that build new types
from old ones. Another useful type constructor is List. For every type
T, the type List T describes finite-length lists whose elements are
drawn from T.
Figure 11-13 summarizes the syntax, semantics, and typing rules for
lists. Except for syntactic differences (List T instead of T list,
etc.) and the explicit type annotations on all the syntactic forms
in our presentation, these lists are essentially identical to those
found in ML and other functional languages. The empty list (with
elements of type T) is written nil[T]. The list formed by adding a
new element t1 (of type T) to the front of a list t2 is written
cons[T] t1 t2 . The head and tail of a list t are written head[T] t and tail[T] t. The boolean predicate isnil[T] t yields true iff
t is empty.
and | {
"domain": "cs.stackexchange",
"id": 14570,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "programming-languages, type-theory, polymorphisms",
"url": null
} |
electromagnetism, waves, complex-numbers, dielectric, dispersion
Title: Is this definition of complex wave number in dispersive media correct? In Griffith's Introduction to Electrodynamics (4th edition, p.421), the complex wave number in the section on dispersive media is defined as $\tilde{k}=\sqrt{\tilde{\epsilon}\mu_0}\omega$. Why is the vacuum permeability used? These are electromagnetic waves in matter, right?
I have checked the errata, but have not found a comment on this nor on any assumptions made earlier in the text. Usually the dispersion comes solely from the $\epsilon$. In most materials (and certainly most that are transparent) the relative permeability is close to unity. I imagine Griffith is just ignoring the possibility of magnetic effects. | {
"domain": "physics.stackexchange",
"id": 76077,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, waves, complex-numbers, dielectric, dispersion",
"url": null
} |
biochemistry, metabolism, energy, energy-metabolism
This can be seen by considering the redox potentials in the table above:
succinate + FAD + → fumarate + FADH2
The two half reactions are
(–0.22 V) FAD → FADH2
(+0.03 V) succinate → fumarate
Thus, there is an overall ΔE0′ of – 0.19V, i.e. a positive ΔG0′ — another anomaly!
Berg et al. are rather coy on this one. They do not comment, but in their Table 17.2 of free energy changes in the steps of the TCA cycle — where all the other values are given as exact figures — they quote “~0” for this step.
This implies a higher (more positive) redox potential for FAD than the –0.22 quoted in the table — certainly not the lower one of dihydrolipoamide dehydrogenase.
I turns out that this is, in fact, the case. In succinate dehydrogenase (aka as fumarate reductase) FAD is covalently attached to a histidine residue (his44 in E. coli) at the other side (position 8) of the flavin ring3. | {
"domain": "biology.stackexchange",
"id": 12399,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, metabolism, energy, energy-metabolism",
"url": null
} |
# Quick way of solving the contour integral $\oint \frac{1}{1+z^5} dz$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9740426465697488,
"lm_q1q2_score": 0.8317474414459496,
"lm_q2_score": 0.8539127566694178,
"openwebmath_perplexity": 300.0691668700658,
"openwebmath_score": 0.9926663041114807,
"tags": null,
"url": "https://math.stackexchange.com/questions/3093958/quick-way-of-solving-the-contour-integral-oint-frac11z5-dz/3093980"
} |
probability-theory, hash-tables
We have address space of $10^6$ slots equivalent to having $10^6$ balls in an urn. Then you have positions with indices divisible by 100 equivalent to having $10000$ $(=10^6/100)$ black balls. $500000$ positions are occupied means that you draw $500000$ balls. Finally, the requirement "all positions with indices divisible by 100 $(=10^6/100)$ are occupied" means "all $10000$ black balls must be selected".
Thus it is the hypergeometric distribution that describes the probability of $k$ successes in $n$ draws, without replacement, from a finite population of size $N$ that contains exactly $K$ successes, wherein each draw is either a success or a failure (black or white).
The probability is equal to
$$ P(k \text{ successes})= \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$$
So, if we take urn-balls model then we have
$$ P(8 \text{ black balls})= \frac{\binom{8}{8}\binom{20-8}{15-8}}{\binom{20}{15}}$$
As for the original problem then we have | {
"domain": "cs.stackexchange",
"id": 9389,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "probability-theory, hash-tables",
"url": null
} |
meteorology, atmosphere, temperature
In the day, the Sun warms the ground until the evening. The Sun's heating rate is higher than the cooling rate, so the temperature is rising until it gets to a point where the heating rate is same as cooling rate. This happens in the evening, so the temperature is steady at that point. But the Sun goes even lower, so the net flux becomes negative. In the night there is only cooling of Earth, so the temperature is falling steadily until the Sun is high enough that it balances the cooling. This happens at a point of a minimum temperature.
Of course, this is valid for most of the days, but we can have some other effects that can change the time of the minimum temperature (clouds, fronts or advection, for example).
On graph: | {
"domain": "earthscience.stackexchange",
"id": 2254,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "meteorology, atmosphere, temperature",
"url": null
} |
soft-question, epistemology
Now to the physics part of the question.
Soft-Answer:
Physics uses positivism and observational proof through the scientific process.
No observation is 100% accurate there is uncertainty in all measurement but repetition gives less chance for arbitrary results.
Every theory and for that matter laws in physics are observational representations that best allow prediction of future experiments. Positivism can overcome theological and philosophical discrepancies such as what is the human perception of reality. Is real actually real type questions.
The scientific process is an ever evolving representation of acquired knowledge based on rigorous experimental data.
No theory is set in stone so to speak as new results allow for modification and fine tuning of scientific theory. | {
"domain": "physics.stackexchange",
"id": 31956,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "soft-question, epistemology",
"url": null
} |
use in expressions. Add a comment | 2 Answers Active oldest Votes into a similar that. Of our constraints are now represented by a Boolean algebra & minimization Techniques - 1 | 10 Questions MCQ has. Is also known as Consensus theorem: AB + a ’ C BC... Theorem: AB + a ' C + BC = AB + a ’.B with gates... Theorems that form important part of Boolean algebra, the use of logic graphs, and the laws previously.. Their hardware implementation Online Test: SET 1 only two values we ’ deal... Marie Sep 23 '19 at 18:13. add a comment | 2 Answers Active oldest.! To apply the rules such that there is less terms and for each term try reducing the variables than... Algebra problems be found similar expression that has fewer terms implement Karnaugh mapping and to optimize minimization 18:13. a. Part of Boolean expressions in order to simplify their hardware implementation K-Maps are a convenient way to simplify hardware... Way to simplify their hardware implementation and to optimize minimization is | {
"domain": "abc-instal.ro",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517050371972,
"lm_q1q2_score": 0.8129098237626483,
"lm_q2_score": 0.8459424334245618,
"openwebmath_perplexity": 982.6859258591757,
"openwebmath_score": 0.5752015113830566,
"tags": null,
"url": "http://abc-instal.ro/2bpngy/c7e075-boolean-algebra-minimization"
} |
tidal-forces
If two rigid, non-deformable spherical masses with spherically symmetric mass distributions orbit each other, can we say there are no tidal forces or tidal effects there?
No. Like Mark said, the tidal force is independent of your non-deformable spherical masses.
If one of them has a permanent, static deformation (e.g. quadrupole moments and higher) are there tidal forces then? If both do?
There are tidal forces because one side of each object is closer to the other object than the other side is.
Or are dynamic, induced deformations required before we invoke the "T-word"?
No deformations are required!
Can tidal forces be radial, such that they do not tend to raise or lower an orbit over time, or must they have tangential components, like the one that is slowly raising the Moon's orbit? | {
"domain": "astronomy.stackexchange",
"id": 3420,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tidal-forces",
"url": null
} |
c#, design-patterns
(NB: I am reluctant to remove the service because sometimes there is a lot of code that needs to go in there that I don't want clogging up my controllers) You are on the right track. The separation of business logic (services) and data-access logic (repositories) is a good thing, I strongly recommend this. I created a generic repository implementing the IRepository<TEntity> interface. It's slightly different than yours, but you get the point (I have a BaseEntity constraint, you can also use class for this):
public class EfRepository<TEntity> : IRepository<TEntity>
where TEntity : BaseEntity, new()
{
private readonly IDbContext _context;
private IDbSet<TEntity> _entities;
public EfRepository(IDbContext context)
{
_context = context;
}
private IDbSet<TEntity> Entities
{
get { return _entities ?? (_entities = _context.Set<TEntity>()); }
}
public TEntity GetById(object id)
{
return Entities.Find(id);
} | {
"domain": "codereview.stackexchange",
"id": 4824,
"lm_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#, design-patterns",
"url": null
} |
python, dice
You can make count_wins function much shorter and readable, counting only wins, not losses. This will make you call it twice, but \$O(2n)==2O(n)==O(n)\$, and \$n\$ is 6, so you lose nothing.
def count_wins(dice1, dice2):
assert len(dice1) == 6 and len(dice2) == 6
return sum(1 for side1, side2 in product(dice1,dice2) if side1>side2) | {
"domain": "codereview.stackexchange",
"id": 41956,
"lm_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, dice",
"url": null
} |
php, mysql, mysqli
Yet, only the last call is actually valid, the others will emit notices (undefined index), or won't do anything even remotely meaningful.
At the very least, you'll have to check for every expected key in the $parameter array using isset or array_key_exists, and then you'll still have to ensure that the value of each key is what you expect it to be. That's going to add a lot of silly-looking if's and else's to the code. What's more: if one of the keys doesn't exist, or doesn't contain the type of data you expect it to contain, what do you do? You'll probably have to throw an exception. Let's take our dummy needsArray function, and re-write it in a safe way. Note that we're only expecting a 1D array, with just 2 keys, but just look at the amount of added code we need to add to ensure the array looks the part:
function needsArray(array $argument)
{
if (!isset($argument['total']) || !is_numeric($argument['total']))
{
throw new InvalidArgumentException(
sprintf( | {
"domain": "codereview.stackexchange",
"id": 13715,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, mysql, mysqli",
"url": null
} |
java, interview-questions, computational-geometry
System.out.println(calcAngle("17:59")); //should return 174.5
System.out.println(calcAngle("11:15")); //should return 112.5
System.out.println(calcAngle("23:15") + "\n"); //should return 112.5
//invalid input should return error message
System.out.println(calcAngle("24:60"));
System.out.println(calcAngle("00:-1"));
System.out.println(calcAngle(":00"));
System.out.println(calcAngle(":"));
System.out.println(calcAngle("25:00"));
System.out.println(calcAngle("11:80")); | {
"domain": "codereview.stackexchange",
"id": 42444,
"lm_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, interview-questions, computational-geometry",
"url": null
} |
Solution:
Since axis of rotation is vertical in shell method, so it will be expressed in terms of x i.e radius of shell is “x” and height of the shell is “f(x) = x^2” as given in a figure:
The volume of a solid revolution by cylindrical shell method is calculated as:
$$V \;=\; \int_1^3 2πx \; x^2 dx$$ $$V \;=\; 2π \int_1^3 x^3 dx$$ $$V \;=\; 2π \left[ \frac{1}{4}x^4 \right]$$ $$V \;=\; \frac{π}{2} (81-1)$$ $$V \;=\; 40π$$
We hope you liked this article. This website offer a lot of other integration related calculators like laplace transform calculator with steps and fourier series transform calculator which you can use for free. | {
"domain": "calculator-integral.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9899864293768268,
"lm_q1q2_score": 0.802363127677583,
"lm_q2_score": 0.8104789155369047,
"openwebmath_perplexity": 297.1223134158401,
"openwebmath_score": 0.6490435600280762,
"tags": null,
"url": "https://calculator-integral.com/blog/volume-of-solid-revolution"
} |
asynchronous, clojure, dining-philosophers
(defn release-forks [n]
(dosync
(release-fork (left-fork n))
(release-fork (right-fork n))))
(defn think [n]
(log "Philosopher " n " is thinking")
(Thread/sleep (rand-int max-thinking-time)))
(defn wait-retry-time []
(Thread/sleep retry-time)) | {
"domain": "codereview.stackexchange",
"id": 15591,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asynchronous, clojure, dining-philosophers",
"url": null
} |
electric-circuits, electric-fields, electric-current, electrical-resistance, batteries
Thus $E^* = -E$.
$E^*$ is the non-conservative field.
Anyway, I can apply the Ohm's law to a real battery because a current flows through it.
$$J = σ(E^* + E)$$
What about the current inside an ideal battery? If we try to apply the Ohm's law (we can't do this, actually) to an ideal battery, then we find an indeterminate form, because the conductibility is infinite and the net electric field is zero. I would expect that inside an ideal battery there isn't a current flow, is it? Even for an ideal battery, current conservation applies. Electrons in have to equal electrons out. An ideal battery gives a boost to the voltage regardless of the current, but current in equals current out. You can still use Kirchoff's laws to find the currents in the circuit. | {
"domain": "physics.stackexchange",
"id": 71807,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, electric-fields, electric-current, electrical-resistance, batteries",
"url": null
} |
standard-model, group-theory, group-representations, lie-algebra, grand-unification
So the only number left to explain is the $5/6$ charge for the rectangular representation, and $-5/6$ for the complex conjugate one on the opposite side of the square. The normalization of this charge is a convention. You may rescale the hypercharge to suit your conventions. However, the ratios of the hypercharges are physical. And the hypercharge has to be a multiple of ${\rm diag}(+2,+2,+2,-3,-3)$ because it has to commute with all the matrices of $SU(3)$ and $SU(2)$ in the blocks, so in the blocks, it must be a multiple of the unit matrix, and the hypercharge must be traceless to be a generator of $SU(5)$, as I mentioned, and $2\times 3 - 3\times 2$ really cancels.
The normalization of this $U(1)$ hypercharge generator in physics is chosen in such a way that it agrees with the conventions adopted in electroweak physics. The hypercharge $Y$ is defined as the average electric charge in an $SU(2)$ electroweak multiplet so that $Q=Y+T_3$. Sometimes, the definition $Q=Y/2+T_3$ is used. | {
"domain": "physics.stackexchange",
"id": 3387,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "standard-model, group-theory, group-representations, lie-algebra, grand-unification",
"url": null
} |
hamiltonian-simulation, quantum-advantage, random-quantum-circuit, many-body-systems
\begin{equation}
\mathcal{F}_{\mathcal{E}}^{(k)}-\mathcal{F}^{(k)}_{U(N)/O(N}\geq0
\end{equation}
Where $\mathcal{F}^{(k)}_{U(N)/O(N}=\frac{2N}{N+1}$. Moreover, the frame potential difference can be easily linked to $\epsilon$-approximate $k$-design in the 2-norm (approximate k-design are usually defined with the diamond norm). $\mathcal{E}$ is an $\epsilon$-approximate $k$-design in the 2-norm if
\begin{equation}
\sqrt{\mathcal{F}_{\mathcal{E}}^{(k)}-\mathcal{F}^{(k)}_{U(N)/O(N}} \leq \epsilon
\end{equation} | {
"domain": "quantumcomputing.stackexchange",
"id": 5035,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "hamiltonian-simulation, quantum-advantage, random-quantum-circuit, many-body-systems",
"url": null
} |
general-relativity, black-holes, spacetime, coordinate-systems, white-holes
To construct the explicit version of such a spacetime we could glue together two regions, the empty region with a Schwarzschild metric and a region with matter which is a patch of closed isotropic homogeneous FLRW universe with dust-like matter. The regions are glued along the spherically symmetric and invariant under time reversal boundary composed of worldlines of dust particles. The junction conditions for this boundary are: 1) the metrics induced on it by both regions are the same and 2) there is no finite surface densities of stress-energy on it. The second condition simply means that the worldlines of boundary particles are both comoving geodesics of FLRW spacetime and radial geodesics with a turning point at $t=0$ of the Schwarzschild metric. Birkhoff theorem and GR version of the shell theorem imply that it is enough to just match proper time of FLRW universe from Big Bang to Big Crunch to proper time from white hole singularity to black hole singularity of the Schwarzschild | {
"domain": "physics.stackexchange",
"id": 53485,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, spacetime, coordinate-systems, white-holes",
"url": null
} |
dna, human-genetics, population-genetics, human-genome, human-evolution
So if we use an average of 20 to 25 years per human generation, we are only looking at about 3,000 to 4,000 generations since there were maybe only a few thousand breeding pairs of humans. Contrast that with bacteria which can go through three to four thousand generations in less than a week, and you can begin to get a feel for why there is so much sequence homology (sameness) in the human genome. See Bottlenecks and founder effects at UC Berkley's Understanding Evolution site for more information. | {
"domain": "biology.stackexchange",
"id": 4955,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dna, human-genetics, population-genetics, human-genome, human-evolution",
"url": null
} |
performance, algorithm, programming-challenge, collatz-sequence, lolcode
... which is easier to quickly parse than a wall of left-aligned code.
Bugs
Collatz of 1 doesn't return 1. It returns 3.
Loops
Looking at your code some more, I get the feeling that you went out of your way to dodge the regular loop structure as it didn't do what you wanted it to do the last time. But as a result you have to write your own incrementer and your own exit condition.
I think you'd be better off by using the regular loop structure. You can rely on the return.
HOW IZ I collatz YR currentNumber
I HAS A cowntr ITZ 1
IM IN YR collatzLoop
BOTH SAEM 0 AN MOD OF currentNumber AN 2, O RLY?
YA RLY, currentNumber R QUOSHUNT OF currentNumber AN 2
NO WAI, currentNumber R SUM OF PRODUKT OF currentNumber AN 3 AN 1
OIC
cowntr R SUM OF cowntr AN 1
BOTH SAEM currentNumber AN 1, O RLY?
YA RLY, FOUND YR cowntr, OIC
IM OUTTA YR collatzLoop
IF U SAY SO | {
"domain": "codereview.stackexchange",
"id": 21022,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, algorithm, programming-challenge, collatz-sequence, lolcode",
"url": null
} |
gazebo-2.2, gazebo-plugin
</joint>
<gazebo reference="bumper1_link">
<sensor name="bumper1_sensor" type="contact">
<always_on>true</always_on>
<update_rate>30</update_rate>
<contact>
<collision>bumper1_link_collision</collision>
</contact>
<plugin filename="libgazebo_ros_bumper.so" name="bumper1_plugin">
<bumperTopicName>bumper1</bumperTopicName>
<frameName>bumper1</frameName>
</plugin>
</sensor>
</gazebo>
<xacro:rr_m_gz_black name="bumper1"/>
<link name="bumper2_link">
<visual>
<geometry>
<box size="0.02 0.3645 0.02"/>
</geometry>
<material name="rr_m_black"/>
</visual>
<collision name="bumper2_link_collision">
<geometry>
<box size="0.02 0.3645 0.02"/>
</geometry>
</collision>
<xacro:inertia_box mass="0.1" x="0.02" y="0.02" z="0.04">
<origin rpy="0 0 0" xyz="0 0 0"/>
</xacro:inertia_box>
</link>
<joint name="bumper2_base_link_joint" type="fixed"> | {
"domain": "robotics.stackexchange",
"id": 3724,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo-2.2, gazebo-plugin",
"url": null
} |
thermodynamics, temperature, scales
Title: Is there any guarantee that there will be only one point on the isotherm curve of a system that has a certain Y coord? When reading this part of the "heat and thermodynamics" book of Zemansky,
is there any guarantee that there will be only ONE intersection of the $Y=Y_1$ and the isotherm line?
The alternative of that would be to prove that all isotherms are one-to-one functions of $X$. Why then?
There must be. Because otherwise the concept of temperature would be self-disproving.
Link to the book. Not sure about the copy right. To download, press the green button in the dark part if you are confused. That part is in page 9. | {
"domain": "physics.stackexchange",
"id": 36583,
"lm_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, temperature, scales",
"url": null
} |
$$\frac { (X(x,y) -h )^2 } { M^2 } + \frac { (Y(x,y)-k )^2 } { m^2 } =1$$
with
• $$X(x,y) = x \cos(R) + y \sin (R)$$
• $$Y(x,y) = y \cos(R) - y \sin (R)$$
• $$h$$ and $$k$$ : the coordinates of center $$C$$ in the rotated coordinate system.
Determining the values of $$h$$ and $$k$$
• $$h = X_C \cos (R) + Y_C \sin (R)$$
• $$k = Y_C \sin (R) - X_C \cos(R)$$
Hence the formula for the ellipse of center $$C= (X_C , Y_C)$$, vertex $$V$$ and a semi-axis of length $$m$$ is :
$$\frac { (X(x,y) - (X_C \cos (R) + Y_C \sin (R)) )^2 } { M^2 } + \frac {( Y(x,y)-(Y_C \sin (R) - X_C \cos(R)) ) ^2 } { m^2 } =1$$
with, as said above $$M= \text {length of the semi- axis [CV]}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9899864302631448,
"lm_q1q2_score": 0.8394765817018965,
"lm_q2_score": 0.8479677660619633,
"openwebmath_perplexity": 354.9986325620844,
"openwebmath_score": 0.8823925852775574,
"tags": null,
"url": "https://math.stackexchange.com/questions/4563216/determining-the-cartesian-equation-of-an-ellipse-be-it-neither-in-standard-pos"
} |
infinity, the numbers become increasingly small. 5^(t/h), where. Note that because the exponential is always positive for real values of x, the domain of the function ln x is (0, ∞). In this article, let us discuss what is an exponential function formula, properties, derivatives with examples. Exponential Functions - Explanation and Examples Using Graphs and Tables Exponential Function - Practice Problems with Solutions Real-Life Examples of Exponential Growth and Decay. Since, the exponential function is one-to-one and onto R +, a function g can be defined from the set of positive real numbers into the set of real numbers given by g(y) = x, if and only if, y=e x. Lindholm is a mechanical engineer who lives in Roanoke. What is exponential decay in real-life? There are many real-life examples of exponential decay. B) use functions such as logarithmic, exponential, trigonometric, polynomial, etc. In this case, the function can be generated by the expression: = which is an exponential | {
"domain": "delleparoleguerriere.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713891776497,
"lm_q1q2_score": 0.8210508857373975,
"lm_q2_score": 0.8333245994514082,
"openwebmath_perplexity": 529.5259514880022,
"openwebmath_score": 0.4718121886253357,
"tags": null,
"url": "http://delleparoleguerriere.it/fsmn/exponential-function-in-real-life.html"
} |
entanglement
Is this possible to do? If you can only use unitary control gates on the second and third qubits, you cannot change the density matrix on the first and last qubits except by single qubit operations. This density matrix is the completely mixed state:
$$\frac{1}{4}\left(\begin{array}{cc}1&0\\0&1\end{array}\right)\otimes \left(\begin{array}{cc}1&0\\0&1\end{array}\right),$$ and unitary single qubit operations don't change it. In the 4-qubit state you want, the first and fourth qubits are not in the completely mixed state.
Are you allowed to use measurements on the second and third qubits? | {
"domain": "quantumcomputing.stackexchange",
"id": 2065,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "entanglement",
"url": null
} |
Or... alternatively you could accept that a "function" doesn't uniquely determine a codomain; only when you construe it as a "function from $A$ to $B$" does it have a well-defined codomain. I get the impression that people really do do this, but that it is rather unpopular in modern times and increasingly so.
In the set theoretic context, every function is surjective on its range (or "image" in some terminologies). But the notion of being a function between $A$ and $B$ is a property which is not intrinsic to the function.
The same can be said about reflexive relations. Or equivalence relations. We always say that $E$ is an equivalence relation on a set. Because reflexivity is an extrinsic property, it requires information beyond what we know about $E$. It is a property of the function and two sets (the domain, which we can actually omit as it is computed from the function, and the codomain). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241982893259,
"lm_q1q2_score": 0.8013517490731327,
"lm_q2_score": 0.8267117962054049,
"openwebmath_perplexity": 125.25616945166227,
"openwebmath_score": 0.9088353514671326,
"tags": null,
"url": "https://math.stackexchange.com/questions/2656388/definition-of-surjectivity-in-set-theoretical-definition-of-functions"
} |
particle-physics, large-hadron-collider, data-analysis
The LHC (typically) publishes findings regardless of their statistical significance, i.e., significant results are not selectively reported.
The LHC teams are guided by statistical committees, hopefully ensuring good practice
The LHC is in principle committed to open data, which means a lot of the data should at some point become public. This is one recommendation for helping the crisis in social sciences.
Typical training for experimentalists at the LHC includes basic statistics (although in my experience LHC experimentalits are still subject to the same traps and misinterpretations as everyone else).
All members (thousands) of the experimental teams are authors on the papers. The incentive for bad practices such as $p$-hacking is presumably slightly lowered, as you cannot 'discover' a new effect and publish it only under your own name, and have improved job/grant prospects. This incentive might be a factor in the replication crisis in social sciences. | {
"domain": "physics.stackexchange",
"id": 66237,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, large-hadron-collider, data-analysis",
"url": null
} |
organic-chemistry, reaction-mechanism, redox
Title: Oxidation of conjugated dienes into carboxylic acids by potassium permanganate In the book - MS Chouhan; Advanced Problems In Organic Chemistry; 11th ed, Chapter Alkenes Q32 - the following reaction is given:
The given solution says that:
Conjugated dienes on oxidation by $\ce{KMnO4/\Delta}$ give oxalic acid
However, the mechanism for this reaction is not given. Also, the formation of a dicarboxylic acid on the parent ring is not explained. I am also unsure what would the products be in a simpler case like buta-1,3-diene. What products will it give?
I checked the internet but could not find a mechanism for the same. The related question of oxidation of arene subsituents by $\ce{KMnO4}$ is not a duplicate.
What is the mechanism for this oxidation? Here is a relevant extract from a PDF (Dr. P.G. Hultin, 28 July 2016) depicting oxidative cleavage. For the compound in hand (your question) the process will be done twice. $\ce{H2O2}$ will serve as the source of $\ce{H3O+}$. | {
"domain": "chemistry.stackexchange",
"id": 9809,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism, redox",
"url": null
} |
So you can construct a proof like this:
1. Take two distinct elements from the domain of the sorting network and call them "0" and "1", so that "0" < "1"
2. Construct all binary strings with the exact length of the sorting network
3. In these strings substitute the 0-bit and the 1-bit with "0" and "1"
4. Apply these strings to the sorting network
5. Each string must be sorted to something like 000..01...1
# Testing $$2^n$$ values
For an exhaustive test of a sorting network of length $$n$$ you usually would have to test all input combinations. But with the 0-1-principle you can bring this down to $$2^n$$ tests (testing all binary strings of length $$n$$).
# Can we do it cheaper? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9783846691281406,
"lm_q1q2_score": 0.806640917486481,
"lm_q2_score": 0.8244619350028204,
"openwebmath_perplexity": 673.338399192162,
"openwebmath_score": 0.5764223337173462,
"tags": null,
"url": "https://cs.stackexchange.com/posts/44772/revisions"
} |
organic-chemistry, molecules
A recurring theme in chemistry,and all of your questions, is "lower energy usually equates with more stable structures." Oversimplifying just a bit (see note on time to reach equilibrium below), we can say that all chemical transformations are also equilibria. That means that our starting materials are converted to products and our products are converted back to starting materials - reactions are continually happening in both directions. Once at equilibrium the rate of the forward reaction matches that of the back reaction and the concentrations of starting materials and products will no longer change. At equilibrium the equilibrium constant ($\ce{K_{eq}}$) describing the relative concentrations of our starting materials and products will have the following form
$$\mathrm{K_{eq}={\frac{(concentration ~products)}{(concentration~starting~ materials)}}}$$
and the equilibrium constant is related to the free energy difference between our starting materials and products by | {
"domain": "chemistry.stackexchange",
"id": 3228,
"lm_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, molecules",
"url": null
} |
general-relativity, differential-geometry, terminology, curvature
Added note.
I edited the above in order to highlight the two more precise questions. The torsion is indeed defined from the connection, independently of the manifold and metric. By synedoche, people sometimes refer to the structure composed of the manifold, the differential structure, the metric and the connection, $(M, \mathfrak{A}, g, \nabla)$, as "the manifold", even though those are somewhat independent objects.
Given a reasonable manifold, it is always possible to find a torsionless connection on it, since every (metrizable) manifold admits a metric tensor, and every manifold with a metric admits a Levi-Civita connection. As a general rule, the difference between two connections is
\begin{equation}
\nabla_a \omega_b = \tilde{\nabla}_a \omega_b - {C^c}_{ab} \omega_c
\end{equation}
If we have a connection with a torsion tensor ${T^c}_{ab}$, we can in particular define $C$ to be the torsion tensor, so that any connection with torsion can give rise to a torsionless connection. | {
"domain": "physics.stackexchange",
"id": 65964,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, differential-geometry, terminology, curvature",
"url": null
} |
formal-languages, proof-techniques, regular-expressions, ambiguity
subexpressions. If the subexpressions are themselves proved
detrministic, i.e. with only one valid mapping fo any string in their
language, then the whole expression must be deterministic.
Hence you now have to prove only that, $0^*$ and
$(11^*000^*)^*11^*01(1+0)^*$ are deterministic, since their
concatenation has a unique decomposition.
So you go on decomposing the expression into subexpression, such that
you have a unique way of matching them with a string of the language.
The next step is to show there is only one way to decompose a string
$w$ in $L((11^*000^*)^*11^*01(1+0)^*)$, as $w=u01v$, with $u\in
L((11^*000^*)^*11^*)$ and $v\in L((1+0)^*)$
And so on ... For each subexpression, you must perform the analysis
according to the type of the subexpression, following the definition
given for each of the four types in the definition of valid mapping.
In the case of $R=S+T$, where $S$ and $T$ are subexpressions of $R$, you only have to prove that $L(S)\cap L(T)=\emptyset$. | {
"domain": "cs.stackexchange",
"id": 4276,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "formal-languages, proof-techniques, regular-expressions, ambiguity",
"url": null
} |
c, animation, sdl, c99
config.h:
#define CONF_APP_NAME "Animations SDL2"
#define CONF_WINDOW_WIDTH 128
#define CONF_WINDOW_HEIGHT 152
#define CONF_PIXELFORMAT SDL_PIXELFORMAT_RGBA8888
#define CONF_CLEAR_COLOR 0, 5, 25
#define CONF_KEY_EXIT SDL_SCANCODE_ESCAPE
And sure enough once I start it the animation runs perfectly : | {
"domain": "codereview.stackexchange",
"id": 26720,
"lm_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, animation, sdl, c99",
"url": null
} |
beginner, html, css, html5
I'd also advice you to use a more logical order for you CSS rules. Right now it's haphazard:
#nav_links li a
#nav_links << high-level
#nav_links li
#nav_links li a:hover << low-level
but it would make more sense to mirror the structure of the markup (and just the complexity of the CSS selectors):
#nav_links << high-level
#nav_links li
#nav_links li a
#nav_links li a:hover << low-level | {
"domain": "codereview.stackexchange",
"id": 7738,
"lm_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, html, css, html5",
"url": null
} |
coordinate-systems, vectors, geometry
Also I know that scalars cannot have a directions.
That is OK, but what is happening when we take 180°>x>90° like in photo.
What should I understand when I see a negative scalar. It feels like it has direction.How it doesn't? $\vec a_{\rm x} = -3\hat i$ can be interpreted in two ways.
$\vec a_{\rm x} = -3\,(+\hat i)$
Here the vector has a magnitude of $3$ - magnitudes are always positive, think of it as the length of the vector when drawn on a piece of paper.
The vector has a component of $-3$ in the $\hat i$ direction - in this case you have chosen a particular direction which is the direction of increasing $x$, $\hat i$, and the vector $\vec a_{\rm x}$ points in the opposite direction to $\hat i$.
$\vec a_{\rm x} = 3\,(-\hat i)=3\,( \hat {i'})$
As before here the vector has a magnitude of $3$. | {
"domain": "physics.stackexchange",
"id": 91480,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "coordinate-systems, vectors, geometry",
"url": null
} |
beginner, ruby, game
def stats_tests(limit)
@stats_mode = true # use to disable gameplay screen output
puts
average_test(limit)
perfect_test(limit)
upset_test(limit)
end
def repeat_check
puts "\nRepeat game with these players (y/n/stats/quit)?"
repeat = gets.chomp.downcase
if repeat == "stats"
print "Number of games per test? "
limit = gets.chomp.to_i
stats_tests(limit)
elsif repeat == "n"
single_game
elsif repeat == "y"
curr_players = @players
newgame
@players = curr_players
reset_arrays
print_players
playgame
repeat_check
else
return
end
end
def single_game
newgame
get_players
playgame
repeat_check
end
single_game Nice question! I may have a go at writing an implementation myself and put it up for review; it's a fun challenge.
Review-wise I haven't gone into great detail (there's a lot of code there), but here are some thoughts: | {
"domain": "codereview.stackexchange",
"id": 9859,
"lm_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, ruby, game",
"url": null
} |
and incircle of a triangle the triangle circumradius! Proving a Nineteenth Century ellipse identity '' the total area is: [ 33:210–215. '' circle is a triangle for more about this ; Zhou, Junmin ; and Yao,,! | {
"domain": "edusteps.net",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9915543710622855,
"lm_q1q2_score": 0.890113684664837,
"lm_q2_score": 0.8976952859490985,
"openwebmath_perplexity": 1355.146206697197,
"openwebmath_score": 0.8856181502342224,
"tags": null,
"url": "http://edusteps.net/6zisq/998e1f-circumcircle-and-incircle-of-a-triangle"
} |
python, performance, beginner
As you can see, to turn the boxes on and off, I use if statements that assign box_list its values based on the input. How can I optimize the assignment of these numbers to box_list without using a billion if statements? mapping
... without using a billion if statements?
Use a dict:
char_to_appearance = {
"A": ("red", [2, 4, 6, 7, 9, 10, 11, 12, 13, 15, 16, 18, 19, 21]),
...
"?": (None, [2, 4, 6, 9, 11, 14, 20]),
".": (None, [19]),
"-": (None, [4, 5, 6]),
}
I started out naming it char_to_boxes, but then I saw
a subset of letters produce color changes.
It's possible you would prefer to handle color separately.
downcase
Expressions like ... in ("A", "a"): are nice enough.
But given that we never draw different glyphs for upper vs lower,
we may as well downcase from the get go:
letter = letter.lower(), or perhaps
letter = input(prompt).lower()
BTW the prompt neglects to mention the - dash punctuation mark.
plural container
box_list = [] | {
"domain": "codereview.stackexchange",
"id": 45438,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, beginner",
"url": null
} |
~You Just Can't beat the person who never gives up~ Babe Ruth
Re: The figure above represents a semicircular archway over a flat street. [#permalink] 02 Aug 2018, 13:30
Display posts from previous: Sort by | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8807970779778824,
"lm_q2_score": 0.8807970779778824,
"openwebmath_perplexity": 6044.133223168102,
"openwebmath_score": 0.7333633899688721,
"tags": null,
"url": "https://gmatclub.com/forum/the-figure-above-represents-a-semicircular-archway-over-a-flat-street-268687.html"
} |
python, python-3.x, recursion
[309, 'Browar Zywiec', 19.174200057983400000, 49.662200927734375000],
[312, 'Bryggeriet lfabrikken', 12.116100311279297000, 56.074600219726560000],
[344, 'Carlsberg Bryggerierne', 12.539299964904785000, 55.666698455810550000],
[345, 'Carlsberg Sverige AB', 12.540499687194824000, 56.900199890136720000],
[386, 'Clner Hofbrau Frh', 6.956999778747559000, 50.940101623535156000],
[429, 'De Friese Bierbrouwerij Us Heit', 5.534200191497803000, 53.060600280761720000],
[448, 'Diebels Privatbrauerei', 6.421299934387207000, 51.533100128173830000],
[460, 'Dortmunder Actien Brauerei DAB', 7.469200134277344000, 51.529800415039060000],
[465, 'Dreher Srgyrak Zrt.', 19.142200469970703000, 47.492099761962890000],
[480, 'Eder & Heylands', 9.071499824523926000, 49.921100616455080000], | {
"domain": "codereview.stackexchange",
"id": 38369,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, recursion",
"url": null
} |
ros
All dependancies are installed.
Originally posted by umesh on ROS Answers with karma: 16 on 2012-06-21
Post score: 0
Original comments
Comment by umesh on 2012-06-22:
Solved! it was an md5 sum mismatch. downloaded manually and replaced the tarball.
Solved! it was an md5 sum mismatch. downloaded manually and replaced the tarball.
Originally posted by umesh with karma: 16 on 2012-06-22
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Mario Prats on 2012-06-22:
Good. Anyway, the error seems more related to write permisions under the opt/ folder. You should probably create a ros workspace somewhere under your home folder (http://www.ros.org/wiki/ROS/Tutorials/InstallingandConfiguringROSEnvironment#Create_a_ROS_Workspace) | {
"domain": "robotics.stackexchange",
"id": 9884,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
quantum-gate, quantum-fourier-transform, fourier-sampling
This gives the final state as $$\frac{1}{2^n}\left(\sum_{x, y=\{0,1\}^n}\left(-1\right)^{f\left(x\right) \oplus x.y}\left|y\right\rangle\right)\left|-\right\rangle.$$
We know that $f\left(x\right) = u.x = x.u$, giving $\left(-1\right)^{f\left(x\right) \oplus x.y} = \left(-1\right)^{x.\left(u\oplus y\right)}$. Summing over the $x$ terms gives that $\sum_x\left(-1\right)^{x.\left(u\oplus y\right)} = 0,\, \forall\, u\oplus y \neq 0$. This means that we're left with the term for $u\oplus y = 0$, which means that $u=y$, giving the output as $\left|u\right\rangle\left|-\right\rangle$, which is measured to obtain $u$. | {
"domain": "quantumcomputing.stackexchange",
"id": 13,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-gate, quantum-fourier-transform, fourier-sampling",
"url": null
} |
c++, beginner, object-oriented, homework
node.nbr = v1; // Same comment as above.
node.cost = cost;
city_adj_list[v2][v1] = cost;
Broken road list?
Why keep a separate list of broken roads. It would seem easier if you could just mark the roads themselves as broken.
I am not convinced that is dyxtra's algorithm
It should look like this:
void find_shortest(int start, int end, std::vector<std::map<ulong,unlong>>& graph)
{
std::set<unlong> searchedList;
std::priority_queue<std::pair<ulong, ulong>> frontierList;
// frontier list contains pairs of (cost, city)
// std::pair is sorted by first then second so the frontierList
// is automatically sorted by the cost of getting to a city.
// Add the start city as the only city in the frontier list.
frontierList.push(std::make_pair(0, start));
while(!frontierList.empty())
{
std::pair<ulong, ulong> next = frontierList.top();
frontierList.pop(); | {
"domain": "codereview.stackexchange",
"id": 1652,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, object-oriented, homework",
"url": null
} |
fluid-dynamics, renewable-energy, turbulence
I guess there are several things at work here: that wake losses are highest when wind is exactly aligned with one axis of the turbine grid; that air temperatures vary with height above water; that the temperature is low enough to be close enough to form fog anyway (and in the photo, it looks like they're a layer of mist just above the sea's surface); that the turbine's wake is mixing air from different altitudes
A study started in early 2011 at Lawrence Livermore National Laboratory on turbine wakes, following on from a study by DONG energy on wakes at Horns Rev (787 kB pdf here)
I'm wondering if it's possible to predict when the phenomenon in the photo here might occur. So my question is - what's the specific formulation of what's going on, here: what does the quantification of causes and effect look like? Thanks to @Martin Gales for the lead to the answer. Here's the quantification, from http://www.dewi.de/dewi/fileadmin/pdf/publications/Magazin_37/07.pdf | {
"domain": "physics.stackexchange",
"id": 6842,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, renewable-energy, turbulence",
"url": null
} |
ros-diamondback, rospack
There should be a check mark under the thumbs up/thumbs down.
Comment by alfa_80 on 2011-02-21:
How to mark it? is it by clicking thumbs up?
Comment by tom on 2011-02-21:
If the issue is solved, mark one (can be your own) of the answers "the-best-one", for the question not to appear unanswered any more, please. Glad you made it :). | {
"domain": "robotics.stackexchange",
"id": 4815,
"lm_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-diamondback, rospack",
"url": null
} |
machine-learning, neural-network, deep-learning, regression, linear-regression
In particular, all predicted outputs rely on the information contained in $\mathbf{f}$.
$\textbf{Therefore}$: Merging multiple outputs into a single neural network can be understood as a regularization technique. The image descriptor $\mathbf{f}$ must contain not only the information if the images shows a dog or a cat, but also all the other information. It must therefore be a more comprehensive (or "more realistic") description of the input, which makes it more difficult for the network to overfit. The network cannot solve a specific task using a non-plausible explanation, as the corresponding image descriptor would lead to bad results on the other tasks.
As a consequence adding additional (auxiliary) tasks to the neural network can improve the accuracy on the initial task, even if you are not interested in predicting these additional tasks. | {
"domain": "datascience.stackexchange",
"id": 8355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, neural-network, deep-learning, regression, linear-regression",
"url": null
} |
c#, strings
if (!string.IsNullOrWhiteSpace(param1) && !string.IsNullOrWhiteSpace(param2) && !string.IsNullOrWhiteSpace(param3))
{
Country = param1.ToUnfriendlyUrl();
Area = param3.ToUnfriendlyUrl();
SearchType = SearchStateType.Address;
SubArea = param2.ToUnfriendlyUrl();
}
else if (!string.IsNullOrWhiteSpace(param1) && !string.IsNullOrWhiteSpace(param2))
{
Area = param2.ToUnfriendlyUrl();
SearchType = SearchStateType.Address;
Country = param1.ToUnfriendlyUrl();
}
else if (!string.IsNullOrWhiteSpace(param1) && param1.StartsWith("@"))
{
SearchType = SearchStateType.Coordinates;
Area = param1;
}
else if (!string.IsNullOrWhiteSpace(param1))
{
SearchType = SearchStateType.Address; | {
"domain": "codereview.stackexchange",
"id": 7848,
"lm_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",
"url": null
} |
javascript, jquery
<style type="text/css">
/* SYNTAX NOTE: there must be a space between "#displays" and ".hidden" */
#displays .hidden { /* if any of the items in the id group "displays" group has the class "hidden", it will not be displayed*/
display: none;
}
#buttons{width: 50%; float: left;}
#displays{width: 50%; float: left;}
</style> | {
"domain": "codereview.stackexchange",
"id": 9862,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery",
"url": null
} |
biochemistry, ph
You can plot these functions to see how charge varies with pH: | {
"domain": "biology.stackexchange",
"id": 6665,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, ph",
"url": null
} |
python, multithreading, python-2.x
def count_characters_in_file(filename, chunk_size=200000):
threads = []
lengths = Queue.Queue()
with open(filename) as f:
while True:
lines = list(itertools.islice(f, chunk_size))
if not lines:
break
t = threading.Thread(target=count_characters, args=(lines, lengths))
t.start()
threads.append(t)
for t in threads:
t.join()
return sum(extract_from_queue(lengths))
if __name__ == '__main__':
import sys
count_characters_in_file(sys.argv[1])
But timings using caching indicates 44 seconds on my machine, so not really worth it given the speed and simplicity of the sequential implementation. | {
"domain": "codereview.stackexchange",
"id": 34761,
"lm_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, multithreading, python-2.x",
"url": null
} |
it is identity. Will result in an identity matrix and difference between scalar matrix and identity matrix diagonal elements are zero and all on-diagonal elements non-zero! Input, the block produces a scalar output from a scalar input, the block preserves.... Matrix times its inverse will result in an identity matrix and denoted by I the matrix. Operations of matrix-vector and matrix-matrix multiplication will be outlined but could be a vector it! Block preserves dimension result in an identity matrix elements 0 and each diagonal are! Will be outlined are going to discuss these points same scalar quantity back in multiplication, know! In this post, we are going to discuss these points numerical computations, blocks that process scalars not! Elements are non-zero, it is 0 x 1 or 1 x 0 if a square,... 1 $matrix is basically a square matrix has all elements 0 each! An identity matrix and denoted by I same scalar quantity say that a matrix. Discuss these points multiplication difference | {
"domain": "com.br",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429107723176,
"lm_q1q2_score": 0.9124489217459949,
"lm_q2_score": 0.9263037292767218,
"openwebmath_perplexity": 404.20872813020765,
"openwebmath_score": 0.7978891730308533,
"tags": null,
"url": "https://grvmax.com.br/box-hedge-akryqc/1783cb-difference-between-scalar-matrix-and-identity-matrix"
} |
python, object-oriented
Title: Counter object in Python with public and private methods I am trying to implement an open source desktop application with python. I want to provide both a gui and an API. I know there is no private methods in python but i am trying to find the most elegant way to keep some methods private. I do not want my users to see all list of methods while using API. After some research, I come up with the implementation below and wondering if there is any problem with my implementation of this concept and if there is any room for improvement. Please provide me a review and do not hesitate to ask any questions you have. Here is my try:
from pprint import pprint
# CamelCase because it "acts" like a class
def CounterController():
class CounterControllerPrivate(object):
def __init__(self):
self.counter = 0
def add_one(self):
self.counter += 1
def reset(self):
self.counter = 0 | {
"domain": "codereview.stackexchange",
"id": 32425,
"lm_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, object-oriented",
"url": null
} |
Now what is the change in y. Learn these rules, and practice, practice, practice. Our finishing x-coordinate was 6.
Let me make this very clear, I don't want to confuse you. Express the actual velocity of the sailboat as a vector. So once again, we just have to algebraically manipulate it so that the x's and the y's are both on this side of the equation. It then travels 40 mph for 2 hours. It could be a negative 3 and 6.
There is one other rule that we must abide by when writing equations in standard form. Draw informal comparative inferences about two populations. And the way to think about these, these are just three different ways of writing the same equation. Left-hand side of the equation, we're just left with a y, these guys cancel out. | {
"domain": "gabrielgoulddesign.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717428891156,
"lm_q1q2_score": 0.8305213881876431,
"lm_q2_score": 0.8418256393148982,
"openwebmath_perplexity": 235.7278116091349,
"openwebmath_score": 0.7362852692604065,
"tags": null,
"url": "https://bitiwedare.gabrielgoulddesign.com/write-an-equation-in-standard-form-given-slope-intercept-form-with-fractions-1088yx.html"
} |
slam, navigation, mapping, turtlebot
Originally posted by daenny with karma: 376 on 2015-06-12
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by pexison on 2015-06-12:
"This of course only works if you create the map with gmapping and use it in AMCL at a later stage, not directly with gmapping." So I am able to use the edited map with an client (ie. wrote on C++ or python) that sends goals to the navigation stack (and avoid the stairways)?
Comment by daenny on 2015-06-12:
Yes, so the steps are: Create the map with gmapping, save with map_saver (http://learn.turtlebot.com/2015/02/01/11/) and edit in gimp. Launch AMCL with edited map. (http://learn.turtlebot.com/2015/02/01/12/) and try to send goals first from within RVIZ and later you can use your own client. | {
"domain": "robotics.stackexchange",
"id": 21895,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, mapping, turtlebot",
"url": null
} |
gazebo, urdf, ros-kinetic
setting /run_id to 56e6e1c0-b477-11e8-bd08-080027cb2f61
process[rosout-1]: started with pid [8192]
started core service [/rosout]
process[gazebo-2]: started with pid [8196]
/opt/ros/kinetic/lib/gazebo_ros/debug: 5: [: Linux: unexpected operator
process[gazebo_gui-3]: started with pid [8214]
process[urdf_spawner-4]: started with pid [8225]
process[robot_state_publisher-5]: started with pid [8226]
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at: | {
"domain": "robotics.stackexchange",
"id": 31746,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo, urdf, ros-kinetic",
"url": null
} |
notation
Please use each type of arrow below for the indicated purpose.
Reference
Alvarez, S. Chemistry: A Panoply of Arrows. Angew. Chem. Int. Ed. 2012, 51 (3), 590–600. DOI: 10.1002/anie.201101767.
Nature Research. Style Guide for Chemical Structures; 2021. Accessed 2021-06-03. (PDF) | {
"domain": "chemistry.stackexchange",
"id": 14489,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "notation",
"url": null
} |
-
Because you do not have 50 reputation points yet, you can only comment on your own questions and answers; the "add comment" button will only appear for you once you gain 50 points (here is an explanation of reputation points). If you'd like, I can convert this post to a comment for you. – Zev Chonoles Jun 18 '12 at 17:58
Fortunately, you should be there, shortly. ^_^ – Cameron Buie Jun 18 '12 at 18:15
I don't see the Bertrand's postulate argument you are sketching, although I certainly agree with the conclusion. More details? – David Speyer Jun 18 '12 at 18:18
I'm not sure this proof strategy works, though maybe it's fixable. Bertrand's postulate is consistent with the list of odd primes looking something like: [all odd numbers up to $m$], [all numbers of the form $(2^k)m + 1$]. When we pair up these primes for a certain $n$, the pairs near the middle will both be in the small section, but $n$ itself will be huge. – Erick Wong Jun 18 '12 at 18:20 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137926698567,
"lm_q1q2_score": 0.8161939428395648,
"lm_q2_score": 0.831143054132195,
"openwebmath_perplexity": 335.3279428396953,
"openwebmath_score": 0.9163510203361511,
"tags": null,
"url": "http://math.stackexchange.com/questions/159972/how-to-prove-that-operatornamelcm-1-ldots-n-geq-sqrtn-pin"
} |
ros
Originally posted by Lorenz with karma: 22731 on 2012-11-13
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 11729,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
quantum-mechanics, momentum, wavelength, wave-particle-duality
Can we then say that any combination of any particles in the ball, such as some atom on its left side and an electron on the right side, have their own wavelength as well?
Generally, and I know this is weirdly worded, what defines an object that can have a wavelength? In general, if you have $N$ particles, then the wavefunction is not a function on 3-dimensional space, so it is not a "wave" in the usual sense you might think of it from classical physics. The wavefunction is actually a wave in a $3N$-dimensional space (the $x, y, z$ coordinates of each of the $N$ particles). Therefore, to really visualize what the wavefunction looks like in its full complexity, you would need to think about a "wave" in an enormous space. | {
"domain": "physics.stackexchange",
"id": 86254,
"lm_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, momentum, wavelength, wave-particle-duality",
"url": null
} |
reference-request, machine-learning, data-mining, data-sets
They build autoencoders that map to a 30-dimensional data space, and where a simple classifier achieve an error rate of 4-5%. For MNIST, 4-5% error rate is very high: the state of the art is an error rate of 0.5% or so, when training a classifier on the original images. So this means that, as far as we know, if you try to map down to 30 dimensions, a lot of information is still preserved, but a significant amount is lost: you lose enough information that the classifier's error rate increases by an order of magnitude.
In short, 30 dimensions doesn't seem to be enough, at least for an embedding built in this way.
The other caveat is that the embeddings built in this way use a multi-linear neural network, and thus might still be fairly nonlinear. If you demand a particularly "smooth"/"nice" embedding, this result might not be relevant. | {
"domain": "cs.stackexchange",
"id": 6887,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reference-request, machine-learning, data-mining, data-sets",
"url": null
} |
nlp, dataset, bert
Title: Can bert uncased predict text classification on foreign data? I am trying to do the fake news/real news classification and used a pre-trained bert uncased model as transfer learning and it gave a solid 81% accuracy. But the problem is while doing sanity checks, I found my dataset has some Korean/Chinese text articles and these are some real news and it gave the trustworthy score(basically probability) as 60-70%. If Bert-uncased is only for the English language, I'm just thinking about how it processes those languages. Does anyone have any insights? BERT is a pre-trained model that is trained on a large amount of text data in multiple languages. While the BERT-uncased model is primarily trained on English text, it also has some understanding of other languages due to the multilingual nature of its training data. | {
"domain": "datascience.stackexchange",
"id": 11803,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nlp, dataset, bert",
"url": null
} |
php, laravel, eloquent
Title: Phishing Project - Refactor Using Models After receiving some good feedback on the previous question, I've refactored my database and have begun to refactor the associated code. As a result of implementing models for all tables in the database, it has become smoother to use Eloquence Builder instead of a custom class using PDO.
Below find some of the changes made. For this review, I'm looking to see how effective my implementation of the Eloquence Builder is and how streamlined this email process seems. That being said, when I was testing the validateMailingList function, the $projects was coming back as an array(array(array()))... Not sure why, but I was able to get it working, but not sure about the best way to parse and clean up this data.
PhishingController
/**
* retrieveProjects
* Helper function to grab the 3 most recent projects for a user, then grab the project object of each project.
*
* @param int $id Mailing_list ID of the requested user. | {
"domain": "codereview.stackexchange",
"id": 21237,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, laravel, eloquent",
"url": null
} |
electromagnetism, gauge-theory, classical-field-theory
In terms of formal mechanics, we have to do something like Lagrangian or Hamiltonian mechanics, with generalized fields/coordinates, an action formalism and so on and so forth. This notion of formal mechanics doesn't have a notion of "a gauge field" - a field is just a space(time)-dependent dynamical variable, and apart from its target space (what the field is "valued in") the only physical properties such a field has arise from the action and the laws of mechanics. | {
"domain": "physics.stackexchange",
"id": 90387,
"lm_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, gauge-theory, classical-field-theory",
"url": null
} |
vb.net
Return settings
End Function
The name GetRecords() isn't choosen that well maybe you can come up with a better one. | {
"domain": "codereview.stackexchange",
"id": 16604,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vb.net",
"url": null
} |
This is, as you can see, a finite value of only 1.
Example 2: x y = 1
The corresponding area from x=1 to x=infinity is:
$$\textit{Area-from-1} = \int_1^\infty {1 \over x} dx = \left( \ln x \right) \large|_1^\infty = \infty$$
As you can see, this is not a finite value.
Wait, but for the second example, isn't the following true:
$\int$$^{\infty}_{1}$$\frac{1}{x}$dx$\equiv$-ln(1)+$lim_{x->{\infty}}$ln(x)=0
?
Also, are there any clever approximations for this area? Would translating the figure into say (x-3)(y-3)=a make any difference (no more singularity)? How would I find the area under a different type of hyperbola (is there a method that works for all hyperbolas that aren't in the form xy=1)? Thanks.
I like Serena
Homework Helper | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877012965886,
"lm_q1q2_score": 0.8007928479878718,
"lm_q2_score": 0.815232489352,
"openwebmath_perplexity": 447.9630850939239,
"openwebmath_score": 0.8242561221122742,
"tags": null,
"url": "https://www.physicsforums.com/threads/how-do-you-find-the-area-under-a-diagonal-hyperbola-xy-a-where-a-is-a-constant.553362/"
} |
guess at the solution is allowed to slowly relax towards the true solution, reducing the errors as it does so. Full text of "Finite-difference Methods For Partial Differential Equations" See other formats. The finite difference method for solving the Poisson equation is simply (2) ( hu)i;j = fi;j; 1 im;1 jn; with appropriate processing of boundary conditions. In general, the right hand side of this equation is known, and most of the left hand side of the equation, except for the boundary values are unknown. Laplace and Poisson’s equations in a rectangular region : Five point finite difference schemes, Leibmann’s iterative methods, Dirichlet's and Neumann conditions – Laplace equation in polar coordinates : Finite difference schemes – Approximation of derivatives near a curved boundary while using a square mesh. A noniterative finite-difference method for solution of Poisson’s and Laplace’s equations for linear boundary conditions is given. These finite difference approximations are | {
"domain": "cbeu.pw",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419671077918,
"lm_q1q2_score": 0.8084519532964451,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 593.6983759923623,
"openwebmath_score": 0.6288873553276062,
"tags": null,
"url": "http://ufap.cbeu.pw/solution-of-poisson-equation-by-finite-difference-method.html"
} |
gazebo-model
Comment by Max Stähr on 2013-02-27:
Hi,
I've just added the file. Can you see the problem?
http://pastebin.com/EECvY9Tn
Comment by Max Stähr on 2013-02-27:
Hi,
I've just added the file. Can you see the problem?
A note about your pasted code: Pausing and unpausing the world within an update call does nothing.
Is camera_model a static model?
Make sure to detach a static model before attaching it to a different link. | {
"domain": "robotics.stackexchange",
"id": 3052,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo-model",
"url": null
} |
javascript, beginner, algorithm, complexity
I wonder if there is an even more efficient way write it
Yes there is, see bottom rewrite.
Rewrites
Using your algorithm and API use.
Comment are only added as I am not sure if you recognize the code or why.
The test for 10 is not worth the cost [1]
const isLucky = n => {
const sum = (a, b) => a + b; // minor memory/parse gain with one rather than two functions
const digitCorral = [];
while (n > 0) {
digitCorral.push(n % 10);
n = n / 10 | 0; // Bitwise OR 0 is the faster form of Math.trunc
}
const first = digitCorral
.slice(0, digitCorral.length / 2)
.reduce(sum);
const second = digitCorral
.slice(digitCorral.length / 2)
.reduce(sum);
return first === second;
} | {
"domain": "codereview.stackexchange",
"id": 31296,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, beginner, algorithm, complexity",
"url": null
} |
cc.complexity-theory, reference-request
It is easy to check that every variable in $I'$ occurs in an even
number of clauses. If $I'$ is satisfiable, then this induces a
satisfying assignment for $I$.
Finally consider a satisfying assignment for $I$.
Use truth values $b_i:=\lnot a_i$ for $1\le i\le n$ and $c:=$FALSE.
The resulting assignment satisfies all clauses in $I'$. | {
"domain": "cstheory.stackexchange",
"id": 4746,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, reference-request",
"url": null
} |
python, design-patterns, pandas, vectorization
employees_with_company_properties = pd.merge(
left=company_employees, right=companies,
left_on='company_name', right_on='company_name'
)
contacts_long = contacts.stack(level='contact_group')
contacts_merged = pd.merge(
left=contacts_long, right=employees_with_company_properties.reset_index(),
left_on='names', right_on='employee_name',
suffixes=('_employee', '_company'),
how='left',
).set_index(contacts_long.index)
contacts_replaced = contacts_merged[[
'company_name', 'address_company', 'description_company'
]].rename(columns={
'company_name': 'names',
'address_company': 'address',
'description_company': 'description',
}).fillna(
contacts_merged[['names', 'address_employee', 'description_employee']]
.rename(columns={
'address_employee': 'address',
'description_employee': 'description',
})
).unstack(
level='contact_group'
).sort_values('contact_group', axis=1) | {
"domain": "codereview.stackexchange",
"id": 44412,
"lm_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, design-patterns, pandas, vectorization",
"url": null
} |
quantum-mechanics, schroedinger-equation, born-oppenheimer-approximation
Title: Solving Schrödinger's Equation for the electronic energies of the Molecular Ion Hydrogen H2+ in the Elliptic coordinate system Electronic Energies of Molecular Ion Hydrogen $H_2^{+}$
$r_1$ is the distance between the proton $1$ and the electron.
$r_2$ is the distance between the proton $2$ and the electron.
$R$ is the distance between the two protons, fixed parameter in Born Oppenheimer approximation.
Schrödinger's Equation:
$$
\hat{H} \Psi = E_{el} \Psi
$$
$$
-\frac{{\hbar}^2}{2 m_e} \Delta \Psi -\frac{e^2}{4 \pi \varepsilon_0} \left(\frac{1}{r_1}+\frac{1}{r_2}\right)\Psi = E_{el} \Psi
$$
Atomic Units:
$$
a_0=\frac{4 \pi \varepsilon_0 \hbar^2}{m_e e^2} = 0.5291 *10^{-10} m
$$
$$
E_h=\frac{\hbar^2}{m_e a_0^2}=27.21 eV
$$
$$
\Delta \Psi + \frac{2}{a_0}\left(\frac{1}{r_1}+\frac{1}{r_2}\right)\Psi=-2 \frac{E_{el}}{E_h a_0^2} \Psi
$$
We introduce the adimentional parameters $ r= \frac{R}{a_0} $ and $ \varepsilon = \frac{E_{el}}{E_h} $
Elliptic coordinate system: | {
"domain": "physics.stackexchange",
"id": 24680,
"lm_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, schroedinger-equation, born-oppenheimer-approximation",
"url": null
} |
ds.algorithms, co.combinatorics, proofs, puzzles
Given a mover-determinable position in chess on an n by n board, what is the complexity of determining who moved?
So you might want to look at things like that, if you want a theoretical project out of the problem. | {
"domain": "cstheory.stackexchange",
"id": 1028,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ds.algorithms, co.combinatorics, proofs, puzzles",
"url": null
} |
classical-mechanics, mathematical-physics, differential-geometry, hamiltonian-formalism, metric-tensor
Title: Metric and the Lagrangian Does the Lagrangian formalism require a metric on the configuration manifold $Q$ in order to define a Lagrangian $L$ on the tangent bundle $TQ$?
Further, if we specify a metric on the tangent bundle then we can via an isomorphism, move this to the cotangent bundle $T^*Q$. That being said how does this metric structure interplay with the symplectic structure? Comments to the question (v2): | {
"domain": "physics.stackexchange",
"id": 20810,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, mathematical-physics, differential-geometry, hamiltonian-formalism, metric-tensor",
"url": null
} |
tropical-cyclone, cyclone
Title: Extratropical transition of tropical cyclone I am a beginner of learning Tropical Cyclone. I would like to represent the extratropical transition of a tropical cyclone. But I can't understand on what actually in need to focus.
For a tropical cyclone, I can calculate time series of rainfall, maximum wind speed, minimum sea level pressure and discuss its features. Similarly, what are the quantities I should calculate to represent the extratropical transitions of the same tropical cyclone? and What actually I need to show?
Is it just simple discuss how a tropical cyclone changes its behavior when it moves toward the higher latitudes? No, it is not sufficient to just discuss the behavior as it moves into higher latitudes. ET occurs because of environmental reasons, not geographical reasons. | {
"domain": "earthscience.stackexchange",
"id": 2025,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tropical-cyclone, cyclone",
"url": null
} |
python, performance, strings, array
if self.matchedWords > 0:
self.matchedLines += 1;
My sum((c in 'aeiouAEIOU') for c in word) >= x is equivalent to your
for i in self.words[wordCount].lower():
if(i=='a' or i=='e' or i=='i' or i=='o' or i=='u'):
self.matchedChars += 1;
if self.matchedChars >= self.vowelCount:
self.matchedWords += 1;
Suggested solution
from itertools import islice
class StringCounter:
def __init__(self, x, y, z):
# Function that takes lines and yields every zth line
self.candidate_lines = lambda lines: islice(lines, z - 1, None, z)
# Function that takes one line and yields every yth word in it
self.candidate_words = lambda line: islice(line.split(), y - 1, None, y)
# Function that takes words and counts how many of them have >= x vowels
self.vowel_rich_words = lambda words: sum(
sum((c in 'aeiouAEIOU') for c in word) >= x
for word in words
) | {
"domain": "codereview.stackexchange",
"id": 34625,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, strings, array",
"url": null
} |
ros, rqt-gui
Originally posted by Wolf on ROS Answers with karma: 7555 on 2015-01-15
Post score: 3
+1 to @gvdhoorn's answer; I just totally forgot what I answered years ago. That solution is not entirely systematic, but fairly nice and easy approach if that fits in whatever need.
I just dropped a time-taking but more robust solution to the thread you referred to. By creating a relatively simple rqt plugin on your own, you can now have a full control in detail.
Originally posted by 130s with karma: 10937 on 2015-01-15
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 20584,
"lm_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, rqt-gui",
"url": null
} |
# Double Inequalities
• March 5th 2010, 12:46 AM
anonymous_maths
Double Inequalities
Need help to solve this:
0 < √1-x^2 < 1
< x < 1
How does that work?
Thanks.
• March 5th 2010, 01:27 AM
Prove It
Quote:
Originally Posted by anonymous_maths
Need help to solve this:
0 < √1-x^2 < 1
< x < 1
How does that work?
Thanks.
I take it that this is
$0 \leq \sqrt{1 - x^2} \leq 1$.
Squaring everything maintains the inequality...
$0 \leq 1 - x^2 \leq 1$
$-1 \leq -x^2 \leq 0$
$1 \geq x^2 \geq 0$
$0 \leq x^2 \leq 1$
Now look at each inequality separately.
$x^2 \leq 1$
$|x| \leq 1$
$-1 \leq x \leq 1$.
But since $0\leq x^2$
$0 \leq x$.
Putting it together, that means
$0 \leq x \leq 1$.
• March 5th 2010, 01:32 AM
Haven
Quote:
Originally Posted by Prove It
But since $0\leq x^2$
$0 \leq x$.
That is false. I.e., $x = \frac{-1}{2}$. $x < 0$ yet $x^2 > 0$. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98615138856342,
"lm_q1q2_score": 0.8420872452022217,
"lm_q2_score": 0.8539127510928476,
"openwebmath_perplexity": 1217.9644568594867,
"openwebmath_score": 0.9278259873390198,
"tags": null,
"url": "http://mathhelpforum.com/algebra/132146-double-inequalities-print.html"
} |
plastics, cleaning
This was able to be sped up with heating or HCl. I would shy away from adding HCl, as it produced a strong Chlorine smell, without any obvious yellow gas. | {
"domain": "chemistry.stackexchange",
"id": 4113,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "plastics, cleaning",
"url": null
} |
ros, ros-kinetic, actionlib, sound-play
This seems to work quite well, So if someone else should hit the same issue that I was having with actionlib and Kinetic this should resolve it.
What was I using actionlib? I needed to get an approximation of how long the speech took. Since I need to block voice recognition while the robot is speaking, this works well. And eliminates the robot trying to respond to any speech that it has output. | {
"domain": "robotics.stackexchange",
"id": 28136,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-kinetic, actionlib, sound-play",
"url": null
} |
ros
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
FAILED
FAILURE: Build failed with an exception. | {
"domain": "robotics.stackexchange",
"id": 20329,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
3. Originally Posted by mmm4444bot
It looks like they started with:
v(t) = v0 + a(t - t0)
and squared each side -- so v0 got squared.
In that case, where did the following come from? This is from the screenshot in my first (original) post and it is to the right of the first equal sign? I think what you say sounds plausible, but leaves this question. For anyone else reading this, I would still like to know the answers to the questions in the OP. The other possible starting equation might be, x=x+vt+1/2at^2, or something like that. Obviously, taking the derivative of that would lead into my OP quite nicely, but what I would most like to know are the answers to the questions in the original post.
Screenshot 2018-02-01 at 6.15.35 AM.png | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9553191284552529,
"lm_q1q2_score": 0.8316982365211819,
"lm_q2_score": 0.8705972818382005,
"openwebmath_perplexity": 719.3923724235982,
"openwebmath_score": 0.8035823106765747,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/109969-deriving-v-2-v-2-2ax-with-calculus"
} |
clustering
(1500,) (1500, 2)
So now we have 1500 instances (records) in 2D space. This can be extended to any number dimensions. 2 is easiest to plot.
plt.scatter(data[:,0], data[:,1])
plt.show()
I will paste the entire algorithm at the bottom of the answer for a quick copy and paste but here I will go through its different parts so you can see how it works. The algorithm goes as follows: first we initialize some centroids within the range of our data. These are the red dots in the image below
def train(self, data, verbose=1):
shape = data.shape
ranges = np.zeros((shape[1], 2))
centroids = np.zeros((shape[1], 2))
for dim in range(shape[1]):
ranges[dim, 0] = np.min(data[:,dim])
ranges[dim, 1] = np.max(data[:,dim])
if verbose == 1:
print('Ranges: ')
print(ranges) | {
"domain": "datascience.stackexchange",
"id": 3720,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clustering",
"url": null
} |
quantum-mechanics, hilbert-space, wavefunction, notation, quantum-states
However, in the rigged Hilbert space formalism, we can make sense of it as a generalized ket and equations like $\langle \psi|x\rangle = \psi^*(x)$ and $\mathbb I = \int \text d x |x\rangle\langle x|$ are true. (Note that there is one $|x\rangle $for each $x\in\mathbb R$.) I think Shankar is trying to justify heuristically the fact that shouldn't worry to much about this subtleties (at least at first) and that it is perfectly ok to use $|x\rangle$ as just a regular ket.
Of course, to make it mathematically sound, you need a rigged Hilbert space $\Phi\subset \mathcal H \subset \Phi^\times$, in which case, for all $x\in\mathbb R$, you can define a continous antilinear functional on $\Phi$ by :
$$\forall \psi \in\Phi, \langle \psi|x\rangle = \psi^*(x) = \int \text dx'\psi^*(x')\delta(x'-x)$$ | {
"domain": "physics.stackexchange",
"id": 80681,
"lm_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, hilbert-space, wavefunction, notation, quantum-states",
"url": null
} |
homework-and-exercises, quantum-field-theory, vacuum, interactions, s-matrix-theory
Title: Explict Form of Ground State in Interacting Field Theory In An Introduction to Quantum Field Theory by Peskin and Schroeder chapter 4, it has discussed about the ground state $|\Omega\rangle$ (where $|0\rangle$ is the ground state in free field theory) in interacting field theory. As (4.27) shows,
$$|\Omega\rangle = \lim_{T\rightarrow\infty(1-i\epsilon)}\left(e^{iE_0T}\langle\Omega|0\rangle\right)^{-1}e^{-iHT}|0\rangle\tag{4.27}$$
And then there is a confusing derivation in (4.28),
$$|\Omega\rangle = \lim_{T\rightarrow\infty(1-i\epsilon)}\left(e^{iE_0T}\langle\Omega|0\rangle\right)^{-1}e^{-iH(T+t_0)}|0\rangle$$
$$= \lim_{T\rightarrow\infty(1-i\epsilon)}\left(e^{iE_0T}\langle\Omega|0\rangle\right)^{-1}e^{-iH(t_0-(-T))}e^{-iH_0(-T-t_0)}|0\rangle$$
$$ = \lim_{T\rightarrow\infty(1-i\epsilon)}\left(e^{iE_0T}\langle\Omega|0\rangle\right)^{-1}U(t_0, -T)|0\rangle\tag{4.28}$$
I got very confused about the derivation. | {
"domain": "physics.stackexchange",
"id": 98832,
"lm_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, quantum-field-theory, vacuum, interactions, s-matrix-theory",
"url": null
} |
quantum-mechanics, statistical-mechanics, quantum-spin, topology
Note however that these loops will only lead to non-trivial statistics in 3+1D, in higher dimensions there will not be any topological obstruction. This is related to the fact that in higher dimensions, you can always untie knots.
More generally you can think about many different ways of getting non-trivial statistics. You can give your object more complicated internal structure than just point-particles (loops are just one example) or you can put your objects on topologically non-trivial manifolds. See for example this paper about so-called "projective ribbon permutation statistics", which is a way of having non-trivial statistics in higher dimensions but with "defect" that have some internal structure.
EDIT: This is an answer to the question asked by Prathyush in the comments. | {
"domain": "physics.stackexchange",
"id": 5112,
"lm_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, statistical-mechanics, quantum-spin, topology",
"url": null
} |
javascript, performance, jquery, canvas
requestAnimationFrame(function () {
_self.drawStage(_self);
});
}
} else if(_self.animationMode === 'mouseout') {
if(_self.radius > _self.initialRadius) {
// Prevent that radius is lower than the initial radius
_self.radius = _self.radius * 0.9 <= _self.initialRadius ? _self.initialRadius : _self.radius * 0.9;
requestAnimationFrame(function () {
_self.drawStage(_self);
});
}
} else {
_self.animationMode = '';
}
};
/********************************************************
Setup new Objects
********************************************************/
$('.dday canvas').each(function(index, canvas){
new Dday(index, canvas);
});
/********************************************************
AnimationFrame polyfill
********************************************************/ | {
"domain": "codereview.stackexchange",
"id": 8535,
"lm_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, performance, jquery, canvas",
"url": null
} |
ros, eigen, macosx, osx, eigen3
http://wiki.ros.org/jade/Migration#Eigen_CMake_Module_in_cmake_modules
It seems the package you're trying to compile (pcl_ros?) is not doing this or is doing it incorrectly. If it were following the suggestion then it would have "fallen" back on the FindEigen.cmake cmake module provided by the cmake_modules ROS package.
It could be that something else is going on that's causing the issue, but that's my take on it. | {
"domain": "robotics.stackexchange",
"id": 22354,
"lm_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, eigen, macosx, osx, eigen3",
"url": null
} |
navigation, robot-localization
Answer to Q7
The number of measurements in the update cycle is irrelevant. The filter will look at the delta between the last measurement time stamp and the current one, do a predict across that time step, then correct for the new measurement, and update the last measurement time stamp. If there is another measurement in the queue, it will do the same thing, and so on, until the queue is empty.
Answer to Q8
I'd prefer not to make assumptions about what data you plan to fuse. I expect users are going to have to tweak parameters to get things working optimally. I also address this very issue in the wiki.
Answer to Q9
Many IMUs will report their error rates in their documentation. For odometry, I've previously used a source of ground truth, e.g., motion capture systems, to determine error rates. You could do less high-tech versions and try things as simple as driving your robot in a long, straight line, and seeing how the measured distance traveled compares to your odometry. | {
"domain": "robotics.stackexchange",
"id": 26604,
"lm_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, robot-localization",
"url": null
} |
performance, assembly, x86
;-------------------------------------------------------------------------------------------------------------------
; CharToHex : Converts a string of chars in memory, to their underlying binary representations, see Description
; Architecture: x86-64
; IN : EBP is the memory offset of the string of input chars; EDI is the memory offset of the string of converted
; converted hexidecimal pairs; EAX is the number of chars to convert
; Returns : Hexidecimal pairs are stored at memory offset EDI
; Modifies : EDI will point to the memory offset immediately after the last hex-pair stored in memory
; Calls : Nothing
; Description : CharsToHex excepts a string of ASCII chars, at offset EBP, and converts the chars to a string of chars
; representing their underlying binary representations. For example, if char at EBP was "A", then [EBP] | {
"domain": "codereview.stackexchange",
"id": 31623,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, assembly, x86",
"url": null
} |
java, performance, hash-map, trie
1) Run time memory is high compare to Hashmap. 2) Memory creation
(using new) is delaying the performance (CPU).
May be i missed one more improvement on getting the better hash. something like below
https://stackoverflow.com/questions/2414117/explanation-of-hashmaphashint-method | {
"domain": "codereview.stackexchange",
"id": 17911,
"lm_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, hash-map, trie",
"url": null
} |
java, swing
if (gen.getPC().getCurrentMorph() != null)
{
morphName = gen.getPC().getCurrentMorph().getName();
}
mainPanel.getTextF("Morph").setText(morphName);
if (gen.getPC().hasVar("{background}"))
{
mainPanel.setTextF("Background",gen.getPC().getBackground());
}
if (gen.getPC().hasVar("NatLang"))
{
mainPanel.setTextF("Natural Language",gen.getPC().getVar("NatLang"));
}
if (gen.getPC().hasVar("{factionName}"))
{
mainPanel.setTextF("Faction",gen.getPC().getVar("{factionName}"));
}
int[] stats = new int[16];
int[] bonuses = new int[16];
int cnt = 0; | {
"domain": "codereview.stackexchange",
"id": 15483,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, swing",
"url": null
} |
$f(x)=x^4+x^3+x$
$f\prime(x)=4x^3+3x^3+1$
Now that its differentiated solve for 0
$4x^3+3x^2+1=0$
$x(4x^2+3x+1)=0$
you a critical point at x = -1.5 and x = 0
now to find a graph is increasing you plug your critical points back in the derivative and if its <0 graph is decreasing >0 increasing
to find concavity you take second derivative and plug in critical points if
>0 then concave up and <0 concave down
the second derivative is
$12x^2+6$
plus in 0 and -1.5
plug 0 in and you see it is >0 so intervals from 0 to infinity is concave up
plug -1.5 it is also concave up because > 0 so from -inf. to -1.5
sorry for lack of work studying for finals
3. Originally Posted by sk8erboyla2004
You can use derivatives to answer this question
First you must find the critical points, take your first equation and differentiate and solve for 0
$f(x)=x^4+x^3+x$
$f\prime(x)=4x^3+3x^3+1$
Now that its differentiated solve for 0
$4x^3+3x^2+1=0$
$x(4x^2+3x+1)=0$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9719924777713886,
"lm_q1q2_score": 0.8608271262277404,
"lm_q2_score": 0.8856314692902446,
"openwebmath_perplexity": 912.2231368772646,
"openwebmath_score": 0.8478879332542419,
"tags": null,
"url": "http://mathhelpforum.com/calculus/87199-find-interval-function-concave-up.html"
} |
organic-chemistry, reaction-mechanism, carbonyl-compounds
that serves as a leaving group. In the image that you linked, it's convenient to circle those specific atoms, but that shouldn't lead you to believe that the mechanism of the reaction is in fact a simple exchange of ions. | {
"domain": "chemistry.stackexchange",
"id": 12707,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism, carbonyl-compounds",
"url": null
} |
[MATH]\color{yellow}\bbox[5px,purple]{=\frac{1}{\dfrac{4}{z}+z-1}+\frac{1}{\dfrac{4}{x}+x-1}+\frac{1}{\dfrac{4}{y}+y-1}**}[/MATH]
Note that if we have another cubic equation with the roots defined as [MATH]\frac{1}{\dfrac{4}{x}+x-1},\,\frac{1}{\dfrac{4}{y}+y-1}[/MATH] and [MATH]\frac{1}{\dfrac{4}{z}+z-1}[/MATH], then [MATH]\frac{1}{\dfrac{4}{z}+z-1}+\frac{1}{\dfrac{4}{x}+x-1}+\frac{1}{\dfrac{4}{y}+y-1}[/MATH] is actually the sum of the roots, i.e. the value of the coefficient of the second term of the cubic equation writing in descending power of the exponents.
Now, let $k=\dfrac{1}{\dfrac{4}{x}+x-1}$, we will then have $k^3+\dfrac{2}{9}k^2-\dfrac{2}{81}k-\dfrac{4}{81}= 0$
In other words,
[MATH]\frac{1}{\dfrac{4}{z}+z-1}+\frac{1}{\dfrac{4}{x}+x-1}+\frac{1}{\dfrac{4}{y}+y-1}=-\dfrac{2}{9}[/MATH] | {
"domain": "blogspot.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754479181589,
"lm_q1q2_score": 0.8328941464779205,
"lm_q2_score": 0.8459424295406088,
"openwebmath_perplexity": 350.40104867142355,
"openwebmath_score": 0.914019763469696,
"tags": null,
"url": "http://masteringolympiadmathematics.blogspot.com/2015/04/regarding-previous-problem-to-evaluate.html"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.