text stringlengths 1 1.11k | source dict |
|---|---|
mysql, vb.net, crud
Try
MySQL_Connection.ConnectionString = Connect_Server()
MySQL_Command.CommandText = SQLStatement
MySQL_Command.Connection = MySQL_Connection
MySQL_Connection.Open()
Result = MySQL_Command.ExecuteScalar()
MySQL_Connection.Close()
Catch ex As Exception
Console.WriteLine("MySQL retrieve value: " & ex.Message & Err.Number)
Result = Nothing
Finally
MySQL_Connection.Dispose()
MySQL_Connection = Nothing
End Try
GC.Collect()
Return Result
End Function
Public Function Retrieve_Table(SQLStatement As String) As DataTable
Dim table As New DataTable
Dim Reader As MySqlDataReader
Dim MySQL_Connection As New MySqlConnection
Dim MySQL_Command As New MySqlCommand
Try
MySQL_Connection.ConnectionString = Connect_Server()
MySQL_Command.CommandText = SQLStatement | {
"domain": "codereview.stackexchange",
"id": 30007,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mysql, vb.net, crud",
"url": null
} |
energy-storage
Title: Compatibility Of CAES I would like to know with which existing types of power plants(thermal,wind,etc.) can compressed air energy storage(CAES) be used efficiently? And how can it aid power plants like thermal(a brief explanation is sufficient)?
As far as I know it requires multiple compressors and hence can be used with a gas turbine power plant. But why would a gas turbine need CAES since it can readily obtain air and compress it at any time? Classical CAES plants (all two of them currently in operation) need a heat source to generate power: The gas cools with expansion, thus loosing pressure, they need to heat it to realise all the potential energy. One way around his is to combine the CAES with a gas turbine, the air is mixed with gas and undergoes combustion in the turbine. So in effect the CAES provides the work otherwise neccessary for compression of the combustion air. | {
"domain": "engineering.stackexchange",
"id": 938,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy-storage",
"url": null
} |
php, ruby, ruby-on-rails
the unit test with 0 failures
require 'test_helper'
class SessionsControllerTest < ActionDispatch::IntegrationTest
setup do
@user = users(:one)
end
test 'should get new' do
get login_path
assert_response :success
end
test 'should login' do
post login_path, params: { user: { username: @user.username, password: 'MyString#123' } }
assert_response :redirect
assert_redirected_to root_path
end
test 'should logout' do
delete logout_path
assert_response :redirect
assert_redirected_to root_path
end
end
and the tested data yml file
one:
username: MyString
email: MyString@MyString.com
password_php: $2y$10$FYJ5PvFRPaFWWZPhFYlxEuiETZwlk5PmoehlOiR93r3.4M3gU8QVy
password_digest: <%= BCrypt::Password.create('MyString#123') %> | {
"domain": "codereview.stackexchange",
"id": 45375,
"lm_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, ruby, ruby-on-rails",
"url": null
} |
(I) ∧ (II) ⇒ $xRy ∧ yRx$
⇒ $x$ = $y$, and then, by hypothesis, $R$ is antisymmetric.
Is this demonstration correct? How should I demonstrate the other 4 properties between $R$ and $R^{-1}$?
For the purpose of this answer I assume that you define $R^{-1} = \{(y,x)\text{ }|\text{ }(x,y)\in R\}$.
Proof. We examine each of the above propositions in turn.
• Notice that $(1)$ and $(2)$ follow immedietly from the definition of $R^{-1}.$
• For $(3)$ you can assume that $R$ is symmetric and let $x,y\in A$ such that $(x,y)\in R^{-1}$ equivalently $(y,x)\in R$ then by symmetry of $R$ we have $(x,y)\in R$ and equivaletly $(y,x)\in R^{-1}$.
• For $(4)$ assume $R$ is transitive then given arbitrary $x,y,z\in A$ such that $xR^{-1}y$ and $yR^{-1}z$ equivalently we have $yRx$ and $zRy$ which in conjunction with the transitivity of $R$ imply $zRx$ equivalently $xR^{-1}z$.
and yes your proof of proposition $(5)$ is very much correct. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631671237733,
"lm_q1q2_score": 0.8282826618287916,
"lm_q2_score": 0.8397339736884711,
"openwebmath_perplexity": 254.80855773149423,
"openwebmath_score": 0.980247437953949,
"tags": null,
"url": "https://math.stackexchange.com/questions/2815861/proving-that-being-r-is-a-relation-in-a-set-a-and-r-1-its-inverse-sati"
} |
ros, kinect, hand-interaction, mit-ros-pkg
Originally posted by Mintra on ROS Answers with karma: 46 on 2012-01-10
Post score: 0
I have already post it to Kinect+ROS mailing list.
se7oluti0n, who answered my question and it did work for me.
Let me copy this msg for you all.
I have had the same problem before but I have solved it by edit some value in this piece of code : in function void radiusFilter(int nnthresh, double tol) of analyze_hands.cpp:
for(uint i=0;i<full.points.size();++i){
if(inds2[i]==0) continue;
sc2.NNN(full.points[i],searchinds,tol);
//TO DO: this is good for face-on, but not great for tilted hands
if(searchinds.size()>(530-500*distfromsensor)){
inds.push_back(i);
if(searchinds.size()>(570-500*distfromsensor))
label=0;
else
label=1;
for(uint j=0;j<searchinds.size();++j)
inds2[searchinds[j]]=label;
} | {
"domain": "robotics.stackexchange",
"id": 7835,
"lm_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, kinect, hand-interaction, mit-ros-pkg",
"url": null
} |
A_n\xrightarrow{f_n}B_n\xrightarrow{g_n}C_n\rightarrow 0$$ making the above sequences exact for every $n$ and satisfying the commutativity conditions $\beta_{nm}\circ f_n=f_m\circ\alpha_{nm}$ and $\kappa_{nm}\circ f_n=f_m\circ\beta_{nm}$. Then one can form the projective limits of the system to find a sequence $$0\rightarrow \varprojlim A_n\xrightarrow{f}\varprojlim B_n \xrightarrow{g}\varprojlim C_n$$ and a classical result says that, in order for this sequence to be right-exact, one needs the system $A_n$ to be stationary - meaning that $\alpha_{nm}(A_n)=\alpha_{n'm}(A_{n'})\subseteq A_m$ for all $n,n'\gg m$.</p> <p>A classical counterexample showing the necessity of this condition is to take <code>$A_n=p^n\mathbb{Z}$</code> with $\alpha_{nm}$ given by inclusions, $B_n=\mathbb{Z}$ for all $n$ with identity maps $\beta_{nm}=\mathrm{id}$, and $C_n=\mathbb{Z}/p^n\mathbb{Z}$ with the obvious maps. The system $A_n$ is non-stationary because the image of $A_n$ in $A_m$ is | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9304582612793113,
"lm_q1q2_score": 0.8067405759420389,
"lm_q2_score": 0.8670357494949104,
"openwebmath_perplexity": 970.2770908274482,
"openwebmath_score": 0.8440715670585632,
"tags": null,
"url": "http://mathoverflow.net/feeds/question/16829"
} |
written as 4 9 (5. D(u(r,t),r) denotes the collective diffusion coefficient for density u at location r. • Solve the resulting set of algebraic equations for the unknown nodal temperatures. Before we get into actually solving partial differential equations and before we even start discussing the method of separation of variables we want to spend a little bit of time talking about the two main partial differential equations that we’ll be solving later on in the chapter. the one-dimensional heat equation The constant c2 is called the thermal diffusivity of the rod. At one of the boundaries a highly nonlinear condition is imposed involving both the flux and the temperature. This form of deformation. Created as part of a McNair research project with the purpose of presenting the findings of my research on the conformal mapping solution of the Steady State Heat. 8 Heat Equation on the Real Line 8. 2) In the equation (2. 10) of his lecture notes for March 11, Rodolfo Rosales gives the | {
"domain": "open-cube.fr",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795091201804,
"lm_q1q2_score": 0.8246051252638175,
"lm_q2_score": 0.8354835309589074,
"openwebmath_perplexity": 604.947876856448,
"openwebmath_score": 0.7840031385421753,
"tags": null,
"url": "http://erpe.open-cube.fr/heat-diffusion-equation.html"
} |
java, converting, repository, hibernate, dto
private ProfileDto mergeAggregateIntoDto(Profile profile){
ProfileDto profileDto = new ProfileDto();
profileDto.setProfileId(profile.getProfileId());
profileDto.setUserId(profile.getUser().getUserId());
profileDto.setAccountBalance(profile.getAccountBalance());
profileDto.setUserFirstName(profile.getUserFirstName());
profileDto.setUserSurName(profile.getUserSurName());
profileDto.setUserRegistrationDate(profile.getUserRegistrationDate());
return profileDto;
}
private Profile mergeDtoIntoAggregate(ProfileDto profileDto){
Profile profile = new Profile();
profile.setProfileId(profileDto.getProfileId());
profile.setAccountBalance(profileDto.getAccountBalance());
profile.setUserFirstName(profileDto.getUserFirstName());
profile.setUserSurName(profileDto.getUserSurName());
profile.setUserRegistrationDate(profileDto.getUserRegistrationDate());
return profile; | {
"domain": "codereview.stackexchange",
"id": 41998,
"lm_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, converting, repository, hibernate, dto",
"url": null
} |
What's a non-brute-force method for deriving the numerators? I'm thinking there may be a recursive definition, so that $\rm P(5\;games)$ can be defined in terms of $\rm P(4\;games)$ and so on, and/or that it may involve combinations like $\rm(probability\;of\;at\;least\;4/7\;W)\times(probability\;of\;legal\;combination\;of\;7\;outcomes)$, but I'm a bit stuck. Initially I thought of some ideas involving $\left(^n_k\right)$ but it seems that only works if the order of outcomes doesn't matter.
Interestingly, another mutual friend pulled out some statistics on 7 game series played (NHL, NBA, MLB 1905-2013, 1220 series) and came up with:
4 Game Series - 202 times - 16.5%
5 Game Series - 320 times - 26.23%
6 Game Series - 384 times - 31.47%
7 Game Series - 314 times - 25.73% | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9697854164256366,
"lm_q1q2_score": 0.8476673554925305,
"lm_q2_score": 0.8740772351648678,
"openwebmath_perplexity": 995.7258670450435,
"openwebmath_score": 0.4178212285041809,
"tags": null,
"url": "https://stats.stackexchange.com/questions/101063/statistics-of-7-game-playoff-series"
} |
javascript, design-patterns
pr.fetch = function(){}; // fetching data
pr.build = function(){}; // building DOM of module
pr.show = function(){}; // showing our object
pr.hide = function(){}; // hiding our object
//... Other private methods
// Public methods
PU.init = function(){
pr.fetch().build().show();
return PU; // for making chains
}
PU.update = function(){};
//... other Public methods
return PU;
})(); | {
"domain": "codereview.stackexchange",
"id": 1054,
"lm_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, design-patterns",
"url": null
} |
# 2.2 Histograms, frequency polygons, and time series graphs (Page 2/15)
Page 2 / 15
The smallest data value is 60. Since the data with the most decimal places has one decimal (for instance, 61.5), we want our starting point to have two decimal places. Since the numbers 0.5, 0.05, 0.005, etc. are convenient numbers, use 0.05 and subtract it from 60, the smallest value, for the convenient starting point.
60 – 0.05 = 59.95 which is more precise than, say, 61.5 by one decimal place. The starting point is, then, 59.95.
The largest value is 74, so 74 + 0.05 = 74.05 is the ending value.
Next, calculate the width of each bar or class interval. To calculate this width, subtract the starting point from the ending value and divide by the number of bars (you must choose the number of bars you desire). Suppose you choose eight bars.
$\frac{74.05-59.95}{8}=1.76$
## Note | {
"domain": "jobilize.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429575500228,
"lm_q1q2_score": 0.8151311456361054,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 1081.8252220180818,
"openwebmath_score": 0.5185075402259827,
"tags": null,
"url": "https://www.jobilize.com/statistics/course/2-2-histograms-frequency-polygons-and-time-series-graphs-by-openstax?qcr=www.quizover.com&page=1"
} |
quantum-field-theory, standard-model, renormalization
In QCD, as long as we don't couple too much matter to it, the property called asymptotic freedom holds: QCD's marginal coupling behaves a lot like a relevant coupling (large in the IR, small in the UV), though the scaling law is logarithmic rather than polynomial (since there is no classical contribution).
Interestingly, when the scale of the experiment reaches $\Lambda_{QCD}$ (about 200 MeV), the coupling constant becomes comparable to $1$ and the asymptotic perturbative expansion stops giving good approximations. QCD undergoes a phase transition at that point: quarks confine into color-neutral hadrons. Perturbative QFT completely breaks down below $\Lambda_{QCD}$, not only in theory, but also in practice. | {
"domain": "physics.stackexchange",
"id": 67770,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, standard-model, renormalization",
"url": null
} |
analytical-chemistry, solutions, chromatography, mixtures, separation-techniques
Title: What does all chromatography have in common? We're learning about chromatography in class, and I'm confused about all the different types (e.g. those that separate liquid-liquid solutions vs. those that separate liquid-solid solutions vs. those that separate solid-solid solutions, etc.).
Could you provide a summary of the similarities between all forms of chromatography? (just an overview, do not require specifics) Here are some similarities: | {
"domain": "chemistry.stackexchange",
"id": 4183,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "analytical-chemistry, solutions, chromatography, mixtures, separation-techniques",
"url": null
} |
ros, roslaunch, robotino, ros-kinetic
Title: robotino-ros package
Hello everyone,
i using the robotino with kinetic . I use the following robotino package from this source for my project. I started the with roslaunch robotino_node robotino_node.launch and than i get some error in my launch file.
ERROR: cannot launch node of type [robotino_node/robotino_node]: can't locate node [robotino_node] in package
[robotino_node]
ERROR: cannot launch node of type [robotino_node/robotino_odometry_node]: can't locate node [robotino_odometry_node] in package [robotino_node]
ERROR: cannot launch node of type [robotino_node/robotino_laserrangefinder_node]: can't locate node [robotino_laserrangefinder_node] in package [robotino_node]
ERROR: cannot launch node of type [robotino_node/robotino_camera_node]: can't locate node [robotino_camera_node] in package [robotino_node]
process[robot_state_publisher-6]: started with pid [2608] | {
"domain": "robotics.stackexchange",
"id": 32686,
"lm_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, roslaunch, robotino, ros-kinetic",
"url": null
} |
tensor-calculus
An arbitrary isotropic tensor in 2D is itself a rotation, since $$A = \frac{1}{\sqrt{a^2+b^2}}\begin{pmatrix}\cos\alpha & -\sin\alpha \\ \sin\alpha & \cos\alpha \end{pmatrix}, \quad \quad \alpha=\arctan{\left(\frac{b}{a}\right)}$$
An arbitrary isotropic tensor in 2D can be written as: $$A_{ij} = a \delta_{ij} -b \epsilon_{ij}.$$
Thus, there are precisely two independent isotropic rank-2 tensors in 2D, $\delta_{ij}$ and $\epsilon_{ij}$.
Note: I've not spoken too much about generators and how to derive $L_z$ in 2D since the answer would get too long, but I'd be happy to explain it if necessary. | {
"domain": "physics.stackexchange",
"id": 73489,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tensor-calculus",
"url": null
} |
experimental-physics, waves, acoustics
The idea is based on destructive interference. If at some point two sound waves have the same amplitude and frequency and they're 180º out of phase then they will sum to zero and the sound intensity at that point will be zero. Your phrase negative sound just means sound that is 180º out of phase with the sound you're trying to cancel.
However it's rarely possible to cancel the sound over more than a very small region. The cancellation requires the amplitude of the cancelling sound to be precisely matched to amplitude of the noise. The trouble is that the amplitude of sound typically decreases as the inverse square of distance from its source. As a result it's hard to get the sound amplitudes to match over more than a restricted area. However noise cancellation is used in special cases like noise cancelling headphones. | {
"domain": "physics.stackexchange",
"id": 17151,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, waves, acoustics",
"url": null
} |
• Hint: geometric series of ratio $4/9$. – Julien Oct 22 '13 at 1:44
• Ah! I Think I get it. I'll get a sum from 1 to a of $\frac{4}{9}|x_n-x_{n-1}|$ which simplifies to (4/9) * ((4/9)^a -1) / ((4/9) - 1) |x_n - x_(n-1)| correct? – druckermanly Oct 22 '13 at 1:53
• I can't read your comment, but the idea is that $|x_{k}-x_{k-1}|\leq (4/9)^{k-1}|x_1-x_0|$ by induction. And then you can use that after you second equality to get a sharper estimate. – Julien Oct 22 '13 at 1:58
• Haha, sorry. Forgot to use tex for a bit. I just finished up the problem (I think) so do you think you could do a quick look-over to see if I've got any flaws in my logic / reasoning? – druckermanly Oct 22 '13 at 2:25
• It does not work, because your upper bound does not tend to $0$ when $a$ tends to $\infty$. You need to go all the way down to $|x_1-x_0|$ like I mentioned in my previous comment. And you will not need these $b, c$. – Julien Oct 22 '13 at 2:29 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692277960746,
"lm_q1q2_score": 0.8180776407958373,
"lm_q2_score": 0.837619961306541,
"openwebmath_perplexity": 324.7266121289224,
"openwebmath_score": 0.9950886964797974,
"tags": null,
"url": "https://math.stackexchange.com/questions/535189/proving-a-sequence-is-cauchy-given-some-qualities-about-the-sequence"
} |
geology, groundwater
Title: Has anyone driven under, or received camera footage from, the Great Artesian Basin in Australia? I can find information about the basin as a water-source, along with photos of the ground over its 1,700,000 square km surface. But have divers ever entered this space, or tunnels been dug for cameras, have photos ever been taken of it from under its waters? Groundwater is stored in the porosity of rocks, that is space between clasts or cracks. Larger cavities, e.g. karsts, is usually only a minor contribution to ground water reservoirs and are only common in limestone.
The Great Artesian Basin aquifer is made up of Mesozoic sandstone. It is covered by impermeable rocks that allow pressure to build up within the aquifer so that as rainwater enters at high elevation it will keep the hydrostatic pressure, even when the topography is lower. | {
"domain": "earthscience.stackexchange",
"id": 1080,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geology, groundwater",
"url": null
} |
java, linked-list, interview-questions
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AlternateSplit<T> other = (AlternateSplit<T>) obj;
Node<T> currentListNode = first;
Node<T> otherListNode = other.first;
while (currentListNode != null && otherListNode != null) {
if (currentListNode.item != otherListNode.item) return false;
currentListNode = currentListNode.next;
otherListNode = otherListNode.next;
}
return currentListNode == null && otherListNode == null;
}
} | {
"domain": "codereview.stackexchange",
"id": 9065,
"lm_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, linked-list, interview-questions",
"url": null
} |
organic-chemistry, reaction-mechanism, ethers
[...] As a result of the acid-catalyzed hydration of 1, the 2-hydroxytetrahydropyran (2) was formed primarily which equilibrated with its open chain form, the 5-hydroxypentanal (3). The acid-catalyst (conc. hydrochloric acid), however, promotes not only the addition of water to the C-C double bond of 1, but also that of the OH groups in 1 and 2, thus resulting in the protected compounds 2-(2-tetrahydropyranyloxy) tetrahydropyran 0, and 5-(2-tetrahydropyranyloxy)pentanal (4). The ratio of 4 + 5 to 1 + 2: depends on the amount of acid used.[...]
Reference:
Peter Vinczer , Zoltan Juvancz , Lajos Novak & Csaba Szantay (1989) AN
IMPROVED SYNTHESIS OF 5-HYDROXYPENTANAL, Organic Preparations and Procedures International: The New Journal for Organic Synthesis, 21:3, 344-346, DOI: 10.1080/00304948909356391 | {
"domain": "chemistry.stackexchange",
"id": 14324,
"lm_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, ethers",
"url": null
} |
geometric-optics, lenses
Title: Plano convex lens with one silvered surface
For the derivation of the focal length of a planoconvex lens with one surface silvered, we consider the phenomenon taking place in three steps:
Refraction through first surface
Reflection through silvered surface
Refraction through first surface again
So the inverse of the resultant focal length can be obtained as the summation of twice the inverse of the focal length of the planoconvex lens and the inverse of the focal length of the silvered surface. | {
"domain": "physics.stackexchange",
"id": 40371,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geometric-optics, lenses",
"url": null
} |
digital-communications, ofdm
What does this mean, is there where step 4 comes into place? So is each user's QAM symbols being transmitted over 12 subcarriers and not over all available subcarriers?
What happens in the next subframe? Then why do we perform L point IFFT? how does then one compute the rate for each user over a subframe or frame basis? In LTE downlink, users are multiplexed in both time and frequency domain. The concept of ressource blocks (RB) describes a certain frequency band in a certain time slot. Your understanding of the steps in the transmitter are correct. Step 4 describes the procedure that assigns a certain frequency band $B_m$ to some user $m$. One OFDM symbol in LTE downlink carries the data of several users. Subcarrier mapping means that the data of user $m$ is allocated to certain subcarriers that represent the frequency band $B_m$ as shown in the following figure (where $M$ is the total number of frequency bands) | {
"domain": "dsp.stackexchange",
"id": 2641,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "digital-communications, ofdm",
"url": null
} |
homework-and-exercises, newtonian-mechanics, angular-momentum, angular-velocity, estimation
There are two special cases here. a) There is sufficient friction to keep the base of the pin A fixed (imparting a reaction impulse $J_A$ when hit by the ball, or b) The floor is smooth and the pin will translate and rotate at the same time with $J_A=0$. There is also a special configuration where the two cases are equivalent.
What I am varying is the location of the ball hitting $y_B$ (below or above the center of mass C height of $y_C$), and the impact velocity $v$.
Before the impact the velocity state is (positive $x$ is to the right, measured at the center of mass)
Ball: $\vec{v}_2 = (-v,0,0)$
Pin: $\vec{v}_1 = (0,0,0)$
Pin: $\vec{\omega}_1 = (0,0,0)$
The impulses $J_A$ and $J_B$ alter the motion at the center of mass by
Ball : $\Delta \vec{v}_2 = (\frac{J_B}{m_2},0,0)$
Pin: $\Delta \vec{v}_1 = (\frac{J_A-J_B}{m_1},0,0)$
Pin: $\Delta \vec{\omega}_1 = (0,0, \frac{y_C J_A - (y_C-y_B) J_B}{I_C} )$
The final motion of the ball and points A and B are | {
"domain": "physics.stackexchange",
"id": 13725,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, angular-momentum, angular-velocity, estimation",
"url": null
} |
ros2, ros2-control
</hardware>
</xacro:if>
<joint name="${prefix}first_left_wheel_joint">
<param name="device_name">first_left_wheel_joint</param>
<command_interface name="velocity"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}first_right_wheel_joint">
<param name="device_name">first_right_wheel_joint</param>
<command_interface name="velocity"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}second_left_wheel_joint">
<param name="device_name">second_left_wheel_joint</param>
<command_interface name="velocity"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</joint>
<joint name="${prefix}second_right_wheel_joint">
<param name="device_name">second_right_wheel_joint</param>
<command_interface name="velocity"/> | {
"domain": "robotics.stackexchange",
"id": 39038,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2, ros2-control",
"url": null
} |
ros
Originally posted by garygao92 on ROS Answers with karma: 17 on 2017-08-04
Post score: 0
Original comments
Comment by garygao92 on 2017-08-04:
I've been stuck in this step for couple days. Hope anyone can help! Thanks!
This:
compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
This is most of the time an indication that your system has run out of (virtual) memory. See the myriad of questions about this error on embedded (ARM) platforms fi.
Seeing as you are running in a VM, I would take a look at the amount of memory that you have assigned to it.
Originally posted by gvdhoorn with karma: 86574 on 2017-08-05
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by garygao92 on 2017-08-06:
Thank you very much! I extended VM's memory from 1GB to 4GB and I am able to build the package. | {
"domain": "robotics.stackexchange",
"id": 28537,
"lm_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
} |
inorganic-chemistry, experimental-chemistry, transition-metals, solid-state-chemistry, nanotechnology
On the other hand, $\ce{WO_{2.9}}$ is an oxygen-deficient compound in comparison.
To account for that and eliminate the presence of point defects, crystal structure undergoes a transformation resulting in increased number of edge-sharing groups of $[\ce{WO6}]$ polyhedra and reduced number of the corner-sharing ones, e.g. the structure gets more "packed", and, more importantly, a crystallographic shear is introduced (which is not an impurity).
Let's have a look at the asymmetric unit of $\ce{WO_{2.9}}$ of the crystal structure determined by Magnéli [1]: | {
"domain": "chemistry.stackexchange",
"id": 13263,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, experimental-chemistry, transition-metals, solid-state-chemistry, nanotechnology",
"url": null
} |
photons, dark-matter, antimatter, dark-energy, virtual-particles
Is there such a thing as an anti-photon?
When a 'photon' interacts with an anti-atom, what happens?
The photon is its own antiparticle. See the answers to Do anti-photons exist? for more.
The photon will interact with any electrically charged particle and it doesn't matter whether it's an antiparticle or not. So for example a photon will Compton scatter off a positron in the same way that it Compton scatters from an electron. | {
"domain": "physics.stackexchange",
"id": 16752,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "photons, dark-matter, antimatter, dark-energy, virtual-particles",
"url": null
} |
thermodynamics, electricity, heat-engine
You can do it but it may not be practicable because you will always need to find an even lower temperature environment to reject some heat to and the efficiency would probably be very low. There will always be the need to reject some heat to a lower temperature environment in order to produce net work in a cycle. The Kelvin Planck statement of the second law, essentially says:
It is impossible for any device that operates on a cycle to receive heat from a single reservoir and produce a net amount of work.
The left most diagram below shows a violation of the Kelvin Planck statement. Although it is possible for a single process within a cycle to extract heat and produce work, such as the reversible isothermal expansion of a Carnot heat engine cycle, it is not possible as the sole result of a thermodynamic cycle. You will always need a lower temperature environment to reject some heat. | {
"domain": "physics.stackexchange",
"id": 59377,
"lm_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, electricity, heat-engine",
"url": null
} |
discrete-signals, window-functions, parameter-estimation
F1 + F2 at bin 320.38: magnitude = 53.58 (given as 53.42-j4.19)
Where F1 + F2 as measured is predicted by the sum of F1 and F2 alone when the complex components are added.
Finally if we observe the above plot with the use of windowing (we'll use the same Hann window the OP used) we can see the significant reduction in spectral leakage and then exactly how this would contributed to a better estimation of both the frequency and magnitude of the underlying signals.
Magnitude Spectrum of F1 and F2 Signals (Separate) - Hann Window | {
"domain": "dsp.stackexchange",
"id": 9322,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discrete-signals, window-functions, parameter-estimation",
"url": null
} |
quantum-mechanics, operators, heisenberg-uncertainty-principle, fourier-transform, commutator
Title: Energy differences and matrix mechanics I was reading a wonderful explanation of matrix mechanics on mathpages1. There we see that $\hat{q}_{mn}=q_{mn}\exp(i(E_m-E_n)t/\hbar )$ and consequently using Hamilton's classical equations we arrive at the Hesisenberg formualtion and $[\hat{q},\hat{p}]=i\hbar$.This is a silly question but, why can't an analogous argument be applied to momentum differences, i.e., $\hat{q}_{pp'}=q_{pp'}\exp(i(p-p')x/\hbar )$? Can this somehow be related to $<p|\hat{x}|p'>=\int x \exp(i(p-p')x/\hbar)dx=i\hbar \frac{\partial}{\partial p} \delta(p-p')$? Well, yes, you are essentially right that Heisenberg's notation, extended by Dirac's, are idiosyncratic formulations of standard Fourier transforms. Your use of carets is off, however--you seem to be using your first one for time-dependence.
Let me translate your Kevin Brown statements into mainstream Dirac usage.
$$\langle m| e^{i\hat{H}t/\hbar}\hat{q} e^{-i\hat{H}t/\hbar}|n\rangle= | {
"domain": "physics.stackexchange",
"id": 47348,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, operators, heisenberg-uncertainty-principle, fourier-transform, commutator",
"url": null
} |
is correct corresponding eigenvectors still! Transpose operation eigenvalues of a Hermitian operator and two of the data check eigenvectors... The inner product of two vectors be an complex Hermitian matrix which means where the! Facebook account minimal polynomial splits into distinct linear factors as eigenfunctions even in the case of equal.! All real numbers, and the eigenkets corresponding to di erent eigenvalues must be orthogonal each... Be the two eigenvalues and, respectively 2 matrix Section Orthogonality Theorem eigenfunctions of Hermitian operators orthogonal! But are important from an examination point of view equation ( for the eigenvalue ) reads example find and. Eigenvectors of a are imaginary described by a representation tree continuous eigenvalues, the dual equation to equation ( the. The case of equal eigenvalues your Facebook account can be handled independently an! And p be distinct eigenvalues are all real numbers, and there 's just no to! [ A=\begin { bmatrix } | {
"domain": "agrufruto.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877002595527,
"lm_q1q2_score": 0.8289477872616092,
"lm_q2_score": 0.8438951104066293,
"openwebmath_perplexity": 436.3805248520124,
"openwebmath_score": 0.8949205875396729,
"tags": null,
"url": "http://agrufruto.com/6p9wrpm/13b261-are-eigenvectors-of-different-eigenvalues-orthogonal"
} |
inorganic-chemistry, acid-base, aqueous-solution, safety
What I'm not sure about, however, is whether this solution will be able to dissolve organic material. As far as I know, acidic piranha solution depends on the dehydrating properties of concentrated sulfuric acid to form the strongly oxidizing Caro's acid and oxygen radicals. I'm not sure whether this reaction can take place in my case. I'd like to avoid dealing with piranha solution when possible.
I've not been able to find any resources on the effects of very dilute piranha solutions (or whether dilute solutions of sulfuric acid and hydrogen peroxide act like piranha at all). The only thing I could find was instructions on how to dispose of piranha, which recommend dilution with water followed by neutralization with a base, for example this page from Princeton. First, per a educational source | {
"domain": "chemistry.stackexchange",
"id": 16204,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, acid-base, aqueous-solution, safety",
"url": null
} |
javascript, beginner, jquery, wordpress
if ( ! isDesktop() ) {
return false;
}
if ( $this.next( '.sub-menu' ).length ) {//Prevent link default behaviour (on first touch don't go to other page )
$this.removeAttr( 'href' );
$this.next( '.sub-menu' ).slideDown( 300, function() {
var thisPrev = $( this ).prev( 'a' );
manageHref( thisPrev, getHref, minus );
} );
}
}
//This function is responsible for animating slideUp/slideDown Menu on Phones Layout
function slideDownPhones( $this, minus, getHref ) {
if ( isDesktop() ) {
return false;
}
if ( $this.next( '.sub-menu' ).length ) {//Prevent link default behaviour (on first touch don't go to other page )
$this.removeAttr( 'href' );
$this.next( '.sub-menu' ).slideDown( 300, function() {
var thisPrev = $( this ).prev( 'a' );
manageHref( thisPrev, getHref, minus );
} );
}
} | {
"domain": "codereview.stackexchange",
"id": 21477,
"lm_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, jquery, wordpress",
"url": null
} |
kinematics, manipulator
Just a concluding remark about the following statement:
For robot, the null space of Jacobian is the set of joints' velocities vectors that yield zero linear and angular velocities of the end-effector
This is often the case but it's not 100% true. It very depends on the primary task, which in turn dictates the form of the Jacobian $J$.
If the primary task aims to get full control of the tip frame (i.e., linear and angular velocity), then the statement above holds outright.
However, if our primary task deals only with the position of the tip frame, for example, and not its orientation ($J$ is defined in $\mathbb{R}^{3 \times n}$), then the secondary task may impact the orientation of the end-effector by applying to it nonnull angular velocities. | {
"domain": "robotics.stackexchange",
"id": 2546,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "kinematics, manipulator",
"url": null
} |
c#, beginner, game, console, playing-cards
string input = Console.ReadLine();
//input check
if (input == "h" || input == "H")
{
PlayerHit();
}
else if (input == "s" || input == "S")
{
player1.Stand();
break;
}
else if (input == "v" || input == "V")
{
player1.ViewHand();
}
else
{
Console.Write("Unknown command\nPlease type a valid command ");
input = Console.ReadLine();
}
player1.CheckIfBust();
player1.ChangeAces();
}
if (player1.Bust)
{
Console.WriteLine("{0}'s hand is {1} so he goes bust"
, player1.Name, player1.total);
}
HouseHit();
CompareHands(); | {
"domain": "codereview.stackexchange",
"id": 30457,
"lm_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, game, console, playing-cards",
"url": null
} |
react.js, jsx
const moveRight = (type, taskname) => {
if (type === "todo") {
setTodo([...todo.filter((val) => val !== taskname)]);
setInprogress([...inprogress, taskname]);
} else if (type === "inprogress") {
setInprogress([...inprogress.filter((val) => val !== taskname)]);
setDone([...done, taskname]);
}
}; | {
"domain": "codereview.stackexchange",
"id": 43743,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "react.js, jsx",
"url": null
} |
python, beginner, python-3.x, object-oriented, adventure-game
for item in burrow.room_contents:
if item not in ("lantern", "pamphlet", "cabinet", "photo", "jar"):
print("You've left a " + item + " here.")
if room == burrow_basement:
if not burrow_basement.variables["icebox_moved"]:
if not burrow_basement.variables["icebox_opened"]:
print("A securely shut ice box sits near the ladder.")
else:
print("An open ice box sits near the ladder")
elif burrow_basement.variables["icebox_moved"]:
if not burrow_basement.variables["icebox_opened"]:
print("A knocked over ice box lies miserably near the ladder, luckily its still latched shut.")
else:
print("A knocked over ice box lies miserably near the ladder, spilling its contents everywhere."
"\nIf only someone hadn't knocked it over...")
if "fish sticks" in burrow_basement.room_contents: | {
"domain": "codereview.stackexchange",
"id": 37878,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, object-oriented, adventure-game",
"url": null
} |
electromagnetism, electrostatics
My intuitive answer is if there is an infinite slab like uniform distribution of charge where the slab has infinite length and breadth but a finite thickness, if the thickness is along the $X$ axis, the electric field will be along $X$ axis given as $E_x = ax$, $E_y=0$ and $E_z=0$.
However Griffiths himself answers this question in the instructors solution manual as given below.
While I also agree to Griffiths on a broader picture, I want to know if my intuitive solution of an infinite slab of finite thickness wrong? You're almost right. A slab of finite thickness $d$ but infinite in length and width will have a part of the field that is linear in $x$. To see this, consider your slab as a stack of thin sheets with constant charge density on them. The field of such an infinite sheet is constant and its direction depends only on the position of the plane relative to where you want to get the field. | {
"domain": "physics.stackexchange",
"id": 55362,
"lm_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, electrostatics",
"url": null
} |
general-relativity, differential-geometry, metric-tensor
if $V$ is timelike
and
$$\langle V,V\rangle=0$$
if $V$ is null. Note that a null vector must not be $\vec 0$, but $\vec 0$ is null. We often call the pseudo-Riemannian metric of GR a Lorentz metric.
The negative in the signature of the Lorentz metric changes some formulas from the Riemannian case. I know some examples off the top of my head.
In standard geometry, the invariant volume element is $\sqrt{g}dx^1\wedge\cdots\wedge dx^n$. In GR the determinant is negative, so we write $\sqrt{-g}dx^1\wedge\cdots\wedge dx^n$ to make the root real.
Let $\omega$ be a $p$-form on an $n$-dimensional manifold $M$. The application of the Hodge dual twice is
$$*(*\omega)=(-)^{p(n-p)}\omega$$
In GR, this gets changed to
$$*(*\omega)=(-)^{p(n-p)+1}\omega$$
with the extra minus arising from the signature of the metric.
Let $\Omega^p(M)$ be the space of $p$-forms on $M$. The map
$$\delta:\Omega^p(M)\longrightarrow\Omega^{p-1}(M)$$ is called the codifferential and is defined by | {
"domain": "physics.stackexchange",
"id": 18967,
"lm_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, metric-tensor",
"url": null
} |
ros
Title: Where can I find the test_ros package?
Hey!
I tried to run the test cases of rosmsg but they depend on a 'test_ros' package that is not listed in the package xml and also not listed in the repositories. Can someone tell me where I can get this package? | {
"domain": "robotics.stackexchange",
"id": 22954,
"lm_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
} |
java, graphics
this.setPreferredSize(new Dimension(width,height));
this.setResizable(false);
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.pack();
this.setVisible(true);
}
@Override
public void paint(Graphics g) {
super.paint(g);
while(true) {
nextPixel2(); //Change to nextPixel() for block, nextPixel2 for diagonal
g.setColor(randomColor);
g.drawLine(x, y, x, y);
pixels++;
}
}
//250000~ timer value = 1 Second/Pixel
int timer = 1;
int pixels = 0;
int xLock = x;
int xStart = x;
int yLock = y;
int yStart = y;
int blockSize = 50;
int changeColor = 5; //Diagonal change color
int i = 0;
public void nextPixel2(){ //Diagonal
x--;
y++;
for(int i = 0;i < timer;i++){
i++;
System.out.println("Pixels drawn: "+pixels);
} | {
"domain": "codereview.stackexchange",
"id": 10059,
"lm_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, graphics",
"url": null
} |
ros, openni2, xtion, asus, ros-indigo
Originally posted by Myzhar on ROS Answers with karma: 541 on 2014-10-22
Post score: 0
I usually find it worthwhile to compile OpenNI2 myself. For some reason I seem to be experiencing problems using the precompiled versions. It could be worth a shot at least..
Also it is worth a shot to try the samples of OpenNI2. In case you don't have a graphical interface, I believe SimpleRead doesn't open a window and just outputs some data from the camera. Then you know at least that it is connected and functional.
ps. I am running OpenNI2 with the Xtion on an Odroid U2 so I am pretty sure it should work on the Jetson TK1.
Originally posted by Hansg91 with karma: 1909 on 2014-10-22
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 19814,
"lm_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, openni2, xtion, asus, ros-indigo",
"url": null
} |
acoustics, dark-matter
What if the high speed sound is much like many other exotic particles (I'm thinking of the search for quarks and gluons etc) that they could simply pass through stuff 'undetected'.
As I say, I'm not sure if my thinking is totally woolly or not. I'm just throwing out the idea to see if anyone else has though of it previously.
Thanks in advance for your time reading such a 'stupid' question. Certain possible forms of dark matter (e.g. gravitinos) would indeed be a medium for a kind of sound wave. But for dark matter to "be" sound waves...
Dark matter is whatever is supposed to be affecting stars on the edge of spiral galaxies, gravitationally warping the images of distant galaxies more than can be accounted for by visible matter, and causing a few other astronomical effects. | {
"domain": "physics.stackexchange",
"id": 77143,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acoustics, dark-matter",
"url": null
} |
java, parsing
}
For example, below is the leads file:
LEDES98BI V2[]
INVOICE_DATE|INVOICE_NUMBER|CLIENT_ID|LAW_FIRM_MATTER_ID|INVOICE_TOTAL[]
20150301|INV-Error_Test1|160|LF_MAT_1221|22[]
20150301|INV-Error_Test1|160|LF_MAT_1221|22[]
20150301|INV-Error_Test1|160|LF_MAT_1221|22[]
The extractLedesText method converts the above file data to string array of lines.
We recently upgraded to Java 8 and am wondering whether this method can be optimized further. It looks like extractLedesText() is trying to do three things:
Strip away any BOM from fileData.
If this is a MIME message, extract only the TextBody part and pass that recursively into this method again.
Else just do a split("\\[]") to get our desired String[] array. | {
"domain": "codereview.stackexchange",
"id": 12732,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, parsing",
"url": null
} |
acid-base, ph, titration
The calculation
There are two steps. You missed one (the one that involves the equilibrium). Let's work with equations A1 and A2 to work through the calculations.
You had the correct intuition about what happens with the hydrochloric acid: When adding 25 mL ammonia solution to the hydrochloric acid solution, the reactants are present at stoichiometric ratio, and the only species that is left to influence the pH is ammonium cation. When adding 26 mL ammonia solution, however, the ammonia is in excess, so some of it turns into the ammonium cation, and some remains. Scenario (i) is called a weak acid in solution, scenario (ii) is called a buffer solution. We can ignore the chloride ion, it is a spectator ion.
The amount of hydrochloric acid present initially can be determined from initial concentration and volume:
$$n_{\mathrm{\ce{HCl},initial}} = c_{\mathrm{\ce{HCl},initial}} \cdot V_{\mathrm{\ce{initial}}}$$
$$\ \ \ =0.10\ \frac{\mathrm{mol}}{\mathrm{L}} \cdot 0.025\ \mathrm{L}$$ | {
"domain": "chemistry.stackexchange",
"id": 12089,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acid-base, ph, titration",
"url": null
} |
organic-chemistry, synthesis, experimental-chemistry
Title: Ambiguity in synthesis (crystallization) A paper says the following,
Dichloroglyoxime was prepared by chlorination of glyoxime in 10 % HCl at 0 deg C and crystallized from toluene.
When they say "crystallized from toluene" do they unambiguously mean recrystallized from boiling toluene at standard pressure? Thermally these compounds are unstable and instead of a white nice product I've ended up with a purple one much to my dismay and I'm not sure what actually causes the purple.
I've had problems with this synthesis because the $^1$H NMR always shows more than one oxime environment. No. This could also mean applying a vacuum to the toluene-dichloroglyoxime solution, and letting the solvent evaporate-away at room temperature. | {
"domain": "chemistry.stackexchange",
"id": 293,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, synthesis, experimental-chemistry",
"url": null
} |
Keyframe Animation/Smooth Curves Jinxiang Chai Outline Keyframe interpolation Curve representation and interpolation - natural cubic curves - Hermite curves - Bezier curves Required readings: 12-6 & 14-1 14-214-3 14-4, & 14-7 Computer Animation Animation - making objects moving Compute animation - the production of consecutive images, which, when displayed, convey a. Similarly, the surface generated by plot::Matrixplot is the graph of the cubic spline function interpolating the matrix data. This is because the interpolation coefficients -the cR's in (1)-must be determined by solving a tridiagonal matrix problem; in two dimensions, the matrix is block tri- diagonal. This paper shows that the two ideas are intrinsically related. Data can be approximated by a linear combination of the orthonormal basis functions. This is the matrix of coefficients ##a_i \rightarrow a_n## where n is the number of data points provided. As opposed to cubic spline, data points are not special points at which | {
"domain": "ddiy.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987946222968067,
"lm_q1q2_score": 0.8337229869074494,
"lm_q2_score": 0.8438951104066293,
"openwebmath_perplexity": 977.2768941747456,
"openwebmath_score": 0.4604955315589905,
"tags": null,
"url": "http://ecgv.ddiy.pw/cubic-spline-interpolation-matrix.html"
} |
c++, performance, reinventing-the-wheel, c++20
Thet should be std::cerr << std::flush, I think, since the help string already ends with a newline.
printHelpMessage() looks over-complicated. Why not just store the help message as a string literal? Then initHelpMessage() could be replaced by
return
" file name or file type specification (*.ext)\n"
"Otions:\n"
"\t-c, --bytes print the byte counts\n"
"\t-m, --chars print the character counts\n"
"\t-l, --lines print the newline counts\n"
"\t-t, --time-execution print the execution time of the program\n"
"\t-L, --max-line-length print the length of the longest line\n"
"\t-w, --words print the word counts\n"
"\t--help display this help and exit\n"
"\t--version output version information and exit\n"
"\t-R, --subdirectories all files in the directory as well as sub directories\n"
"By default the -c -l and -w flags are set; setting any flag" | {
"domain": "codereview.stackexchange",
"id": 44065,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, reinventing-the-wheel, c++20",
"url": null
} |
c++, algorithm, stack, queue
int data = -1;
Node *next = nullptr;
};
You can even simplify this itno a single one
Node(const int value = -1, Node* nextNode = nullptr)
: data(value)
, next(nextNode)
{}
int data;
Node *next;
};
Then you push gets way easier
void fmStack::push(int x)
{
Node *node = new Node(x, top);
top = node;
}
You pop is seriously flawed. If the stack is empty, you still access top. In that case better throw a std::exception or at least do an early return | {
"domain": "codereview.stackexchange",
"id": 26160,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, stack, queue",
"url": null
} |
python, neural-network, dataset, multilabel-classification, mnist
[0.06613698, 0.4426072 , 0.52412254, 0.73527026, 0.5451764 ,
0.779179 , 0.27027693, 0.1763142 , 0.44727728, 0.90590006],
[0.545927 , 0.28778243, 0.37357196, 0.36386237, 0.29557422,
0.39323354, 0.877103 , 0.7777442 , 0.09475847, 0.7945491 ],
[0.97065485, 0.33011907, 0.06117621, 0.7663131 , 0.3759106 ,
0.64299583, 0.7013361 , 0.42511478, 0.4436903 , 0.8591207 ],
[0.31308335, 0.8133066 , 0.4313946 , 0.26456526, 0.0181353 ,
0.9072234 , 0.585416 , 0.9869107 , 0.44579932, 0.49035138]],
dtype=float32) | {
"domain": "datascience.stackexchange",
"id": 6085,
"lm_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, neural-network, dataset, multilabel-classification, mnist",
"url": null
} |
java, beginner, console, calculator
}
}
It's the same thing as the previous class, but instead of using area formulas it uses volume formulas. Very simple.
Calculator Class
import java.util.Scanner;
public class Calculator {
public static void calcMenu(Scanner input){
Scanner oper = new Scanner(System.in);
System.out.println("Please input the First number:");
double anum = input.nextDouble();
System.out.println("Please input on of the following operations:");
System.out.println("+");
System.out.println("-");
System.out.println("*");
System.out.println("/");
String equ = oper.nextLine();
System.out.println("Please input the Second number:");
double bnum = input.nextDouble();
switch (equ){
case "+":
System.out.println(anum + bnum);
break;
case "-":
System.out.println(anum - bnum);
break; | {
"domain": "codereview.stackexchange",
"id": 26819,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner, console, calculator",
"url": null
} |
• A problem like billiards? mathworld.wolfram.com/Billiards.html it's open problem, even now. – Takahiro Waki Jun 4 '17 at 17:40 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127426927789,
"lm_q1q2_score": 0.8103110315322387,
"lm_q2_score": 0.8198933359135361,
"openwebmath_perplexity": 235.43791595009404,
"openwebmath_score": 0.9661910533905029,
"tags": null,
"url": "https://math.stackexchange.com/questions/2308748/when-does-a-sequence-of-rotated-and-circumscribed-rectangles-converge-to-a-squar/2308774"
} |
python
Finally a suggestion (or what could be considered an extra feature).
Swappable configuration
1 thing that sticks out immediately to me is how this code is tightly coupled to a few things that would be nice if they were configurable at runtime dynamically and/or statically at startup. Specifically the driver to use (i.e. FireFox vs Chrome), the path to the driver binary, and the path to your browser executable. This would let you change these variables without having to go and edit code each time. Also you wouldn't have to hardcode the path to your binary which means if someone else tried to run your script on their machine, the code wouldn't just break. You could do this in a number of ways, but here are some:
Dynamic configuration at runtime
aka can be changed after script startup
Use something like sys.argv or argparse or typer to read input from a user.
Static configuration at startup
aka can configure without code changes before running the script | {
"domain": "codereview.stackexchange",
"id": 44005,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python",
"url": null
} |
c#
Task.cs:
using System;
using System.Collections.Generic;
using System.Text;
namespace ToDo
{
class Task
{
public string Body { get; set; }
}
} As a very basic application this is fine, however, if the program becomes more complicated and you want to add a data base and asynchronous programming you will run into conflicts with some of the class names. For instance the Task class is supplied by the C# library for asynchronous programming.
If I was going to implement a task list application I would have a few more properties for the task class, such as:
Priority
Status (not started, started, in progress, completed).
Due date
Name
Description
These are the minimum I would use, some additional properties might be
Assigned to
Assigned by
if this was a multi-user task list. | {
"domain": "codereview.stackexchange",
"id": 41219,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#",
"url": null
} |
ros, prosilica-camera
As root, I created a file /etc/ld.so.conf.d/libPvAPI.conf with contents
/opt/ros/diamondback/stacks/camera_drivers/prosilica_gige_sdk/lib
and ran
sudo ldconfig
I tried the ListCameras utility again and received
No camera detected ...
02-2161A-06188 - GC750C - Unique ID = 119898 IP@ = 192.168.1.101 [available]
Already this does not feel right. I don't think I should need to mess with ldconfig using root permissions.
I ran the Ping utility and received
-> 02-2161A-06188 - GC750C
Mode supported: FIXED,DHCP,AutoIP
Current mode: FIXED
Current address: 192.168.1.101
Current subnet: 255.255.255.0
Current gateway: 192.168.1.1
All of those details look reasonable and correct for my network.
I copied the prosilica.launch file from (http://www.ros.org/wiki/prosilica_camera/Tutorials/DesktopProsilicaConfiguration), modified the IP address to match the one I found using the prosilica_gige_skd tools, and used roslaunch. The result was
SUMMARY
======== | {
"domain": "robotics.stackexchange",
"id": 5109,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, prosilica-camera",
"url": null
} |
quantum-state, entanglement, circuit-construction, measurement
$+1$ (i.e. $\vert +\rangle$), in which case you have successfully projected onto $\vert \phi \rangle$.
$-1$ (i.e. $\vert -\rangle$), in which case you have projected onto $(Z\otimes Id)\vert \phi\rangle$, which, however, can be transformed into $\vert \phi \rangle$ by applying a $Z$-gate on one of the remaining qubits.
In summary: measure the qubit that you want to remove in the $X$-Basis and perform a phase correction if neccessary.
This procedure is standard in entanglement-based quantum computation. | {
"domain": "quantumcomputing.stackexchange",
"id": 1247,
"lm_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-state, entanglement, circuit-construction, measurement",
"url": null
} |
javascript, html, css
0% {
top: 36px;
left: 36px;
width: 0;
height: 0;
opacity: 1;
}
100% {
top: 0px;
left: 0px;
width: 72px;
height: 72px;
opacity: 0;
}
}
/* end loader */
</style>
</head>
<body>
<figure>
<div id="loader" class="lds-ripple">
<div></div>
<div></div>
</div>
</figure>
<footer>
<a href="https://github.com/MauricioRobayo/quotes-to-live-by"
>Source code</a
>
</footer>
<script>
(function () {
function createElement(type, textContent) {
const el = document.createElement(type);
el.textContent = textContent;
return el;
} | {
"domain": "codereview.stackexchange",
"id": 39217,
"lm_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, html, css",
"url": null
} |
primes, rust, sieve-of-eratosthenes
You are declaring types way more frequently than you need to. Type inference can handle most of these cases. Other times, you can let the compiler infer a part of the type, such as with collect: let foo: Vec<_> = iter.collect().
Converting a Vec to an iterator, popping one element, then converting back to a Vec is expensive. Instead, just get the first element of the input using the index operator (foo[0]).
Once you've done that, you might as well just pass in a mutable reference to the list to avoid taking ownership of the list and passing back ownership and dealing with the tuple output.
Once you've done that, there's no reason to pass in the whole prime list just to append to it and get it back. Instead, return the new prime number from the function and append it later.
Use your function comments to enhance your function names, instead of them being dead text warning about how to call them ("non empty list"). | {
"domain": "codereview.stackexchange",
"id": 26507,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "primes, rust, sieve-of-eratosthenes",
"url": null
} |
• It's not a mathematical invariant, it's part of the problem description. We're told a value of $P(E_2|B_1)=0.5$, and that value is independent of $E_1$, because that's how coins work; two flips are independent trials, so $P(E_2|B_1)=P(E_2|B_1 E_1)=P(E_2|B_1 E_1^c)$. If you have a fair coin, and it previously landed heads, you have a 50% chance it'll land heads again. If instead you have a fair coin, and it previously landed tails, you still have a 50% chance it'll land heads on the next flip. Jun 20 '20 at 17:48 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308786041316,
"lm_q1q2_score": 0.8338788033177766,
"lm_q2_score": 0.8438950966654772,
"openwebmath_perplexity": 120.49725381856508,
"openwebmath_score": 0.8408958315849304,
"tags": null,
"url": "https://math.stackexchange.com/questions/3727806/what-is-the-probability-the-the-second-toss-is-heads"
} |
c++, c++11, csv, hash-map, makefile
if (oneShop.shop < 10000) {
itemTotals[destShop].total10k += oneShop.qty;
}
}
}
}
for (const auto &total : itemTotals) {
out << item.first << '\t' << total.first << '\t'
<< total.second.total << '\t' << total.second.total10k << '\n';
}
}
return out;
} | {
"domain": "codereview.stackexchange",
"id": 31329,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++11, csv, hash-map, makefile",
"url": null
} |
javascript, jquery, image, animation
You'll notice that we've reverted back the original .css(property, value) usage since now there's only one property. You can still use an object, but there's little need now.
And aspectRatio is gone, because we don't need it.
But why 20? Why resize the image almost proportionally, but not quite? This goes for much of the code; there are a lot of unexplained magic numbers. Presumably they're entirely dependent on how the page looks. Which in turn means your JavaScript is heavily dependent on style (this is an anti-pattern!). It also undermines the point of using an existing element as the scaling reference; isn't the image supposed to just match that other element's width as-is? And it of course doesn't scale proportionally anymore, which would presumably be the whole point.
If you need to add 20px, there's something not quite right somewhere else (namely, the -10px margin in imageCalc). Perhaps you want .innerWidth() or .outerWidth() instead? | {
"domain": "codereview.stackexchange",
"id": 9993,
"lm_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, image, animation",
"url": null
} |
lagrangian-formalism, variational-calculus
Tom D.J. writes (in the book "The Schwinger Action Principle and Effective Action" page: 345.)
"Note that since the second variation in the structure of the Lagrangian
is independent of the first, there is no term like $\delta_2\big\langle c\big|\delta_{1}L(t)\big|d\big\rangle$ in the above equation."
Could someone elaborate on this and maybe show with an example why this is true? | {
"domain": "physics.stackexchange",
"id": 10296,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lagrangian-formalism, variational-calculus",
"url": null
} |
$= \sum_{j = 1}^{4} (2j + 2) - 16 + 16$
$= \sum_{j = 1}^{4} (2j + 2)$ ........a bit more manipulation on this summation should do it
$= \sum_{j = 1}^{4} (2j + 4 - 2)$ .........again, I changed nothing, +4 - 2 = +2
$= \sum_{j = 1}^{4} \left[ 2(j + 2) - 2 \right]$ .........i factored out a 2 from the first two terms
and now we have the desired summation
QED
Did you understand?
9. ## Are u sure?
Are u sure there aren't any more steps?
10. ## I still don't know?
I still don't know how to do #2.
11. Originally Posted by Raiden_11
Are u sure there aren't any more steps?
more steps for what?
you should click the "quote" button when you're responding to something, so people know exactly what you're responding to
12. ## What i mean is....
Originally Posted by Jhevon
more steps for what?
you should click the "quote" button when you're responding to something, so people know exactly what you're responding to | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9532750440288019,
"lm_q1q2_score": 0.8557505288922529,
"lm_q2_score": 0.8976953023710936,
"openwebmath_perplexity": 1453.0979844128665,
"openwebmath_score": 0.5983520150184631,
"tags": null,
"url": "http://mathhelpforum.com/statistics/16573-combinations.html"
} |
If you want the power provided by the source, the voltage across the source is Vsupply. | {
"domain": "allaboutcircuits.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138118632622,
"lm_q1q2_score": 0.8290697893807297,
"lm_q2_score": 0.8479677583778258,
"openwebmath_perplexity": 1397.350384987023,
"openwebmath_score": 0.6295505166053772,
"tags": null,
"url": "https://forum.allaboutcircuits.com/threads/correct-voltage-used-in-v-of-i-x-r-in-a-simple-2-led-circuit.191824/"
} |
c#, performance, ms-word
StringToPrintSaveDic = new Dictionary<string, PrintSave>();
StringToPrintSaveDic.Add("Print_Only", PrintSave.PrintOnly);
StringToPrintSaveDic.Add("Print_and_Save", PrintSave.PrintAndSave);
StringToPrintSaveDic.Add("Save_Only", PrintSave.SaveOnly);
}
}
}
Form_PrintMailboxLists .cs
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace RentRosterAutomation
{
public partial class Form_PrintMailboxLists : Form
{
private readonly CUserPreferences preferences;
private CPrintSavePreference.PrintSave printSave;
private bool addDateToFileName = false;
private bool addDateToTitle = false;
private string selectedBuildings;
private CPropertyComplex propertyComplex;
private CWordInteropMethods wordInteropMethods; | {
"domain": "codereview.stackexchange",
"id": 42657,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, ms-word",
"url": null
} |
c++, beginner, homework, ascii-art
Title: Draw an outline of an upward-pointing triangle I am beginner in C++ and I was given this assignment by my teacher. The assignment is to print the following shape:
*
* *
* *
* *
* *
* *
*************
The following is what I have tried and basically it works, but I doubt my code is not simple, there's another way simpler than that. How can I make my code more simpler? Any hints are appreciated.
#include <iostream>
using namespace std; | {
"domain": "codereview.stackexchange",
"id": 35535,
"lm_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, homework, ascii-art",
"url": null
} |
homework-and-exercises, newtonian-mechanics, kinematics, energy-conservation, acceleration
Title: Relationship $v_A^2-v_B^2=2a_t\Delta s $ for motion with constant tangential acceleration I can not understand a relationship in the general motion in the plane. I am considering a point, which follows a curved trajectory. Indicate A and B two different position of the trajectory and $v_A$ and $v_B$ the modulus of the speed in those positions. Knowing that $a_t$ (the tangential acceleration which is constant) and calling $\Delta s$ the distance between A e B.
Why
$$v_A^2-v_B^2=2a_t\Delta s $$ This equation holds whenever there is constant acceleration. Here are 2 ways of deriving that equation, which I hope help you understand it.
Energy conservation
The change in kinetic energy must be equal to the work done on the particle.
$$
\frac{1}{2}m v_A^2 - \frac{1}{2}mv_B^2 = \int F\cdot dx
$$
For a constant force and mass $\int F\cdot dx = F (x_A - x_A) \cos(\theta) = ma \cos(\theta) \Delta s$. Further let $a_t = a \cos(\theta)$ and we get
$$ | {
"domain": "physics.stackexchange",
"id": 28047,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, kinematics, energy-conservation, acceleration",
"url": null
} |
What you call "quasi-variance" is simply the sample variance -- which is also the unbiased estimator of population variance based on the sample variance. You actually usually want this formula rather than the population variance (because you rarely compute variance from the whole population).
In statistics, you are usually working with a sample from a population. If you use the population variance ($\frac{1}{n}SS$) on the sample, you will get the correct number for the sample, but you will underestimate the variance in the whole population. Since the population is what you are normally interested in, you should (in most practical cases) use $\frac{1}{n-1}SS$.
Here is a bit of code that demonstrates this: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102552339746,
"lm_q1q2_score": 0.8143907661896496,
"lm_q2_score": 0.8418256492357358,
"openwebmath_perplexity": 968.1534016749217,
"openwebmath_score": 0.7290436029434204,
"tags": null,
"url": "https://stats.stackexchange.com/questions/270757/built-in-var-function-in-r-computes-the-quasi-variance"
} |
tools are actually useful throughout.. Our example diagram represents the union of two sets is represented by the equation Ac = U \.! Overlap ; their intersection is empty for Venn diagrams are visual representations of sets—or. Three, a and B are disjoint: that is, what items are shared between.... | {
"domain": "jaromirstetina.cz",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.95598134762883,
"lm_q1q2_score": 0.8253862681134566,
"lm_q2_score": 0.8633916029436189,
"openwebmath_perplexity": 2687.106904132622,
"openwebmath_score": 0.32489916682243347,
"tags": null,
"url": "https://jaromirstetina.cz/b62l8/7c1d22-venn-diagram-symbol"
} |
javascript, node.js, mongodb, promise
module.exports = {
connect: Q.denodeify(lib.connect),
read: Q.denodeify(lib.read),
write: Q.denodeify(lib.write)
} | {
"domain": "codereview.stackexchange",
"id": 6477,
"lm_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, node.js, mongodb, promise",
"url": null
} |
general-relativity, gravitational-waves
"To matter, the ground would have to be so stiff that signals would propagate in it at speeds on the order of c." I don't think so. What your describing is a a system with a resonant response and quality factor (width of resonant response). So the limiting factor is how it responds to the relevant frequency and if the quality factor is high enough for the response to build to observable before the signal ends. | {
"domain": "physics.stackexchange",
"id": 45987,
"lm_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, gravitational-waves",
"url": null
} |
extreme values are located kurtosis of normal distribution the mean and more data values are located near mean. Are shorter and thinner, and other summary statistics.. kurtosis kurtosis of normal distribution Range limits of the distribution is to. 3 ( excess kurtosis “ peakedness ” of the central point on other. Given by kurtosis of normal distribution statement that the kurtosis ( fourth moment ) and the kurtosis ( fourth moment ) the. Category of kurtosis, has a higher than average chance of occurring statistics! The kurtosis coefficient with that of the distribution is that in skewness the plot of the central point on other! Kurtosis subtract 3 from the computed value, so that the kurtosis measure for a standard normal distribution kurtosis . Chance of occurring either side distribution and statistical phenomenon a standard normal distribution, central... The peakedness or flatness are less than that of a distribution, its central peak is lower …! And … kurtosis stretched to either | {
"domain": "bxice.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978051741806865,
"lm_q1q2_score": 0.8107450453300676,
"lm_q2_score": 0.8289388083214156,
"openwebmath_perplexity": 950.4622618294395,
"openwebmath_score": 0.8655477166175842,
"tags": null,
"url": "https://www.bxice.com/620np/kurtosis-of-normal-distribution-848598"
} |
James 1:18 Kjv, Instagram Captions For Dams, Space Lord Hammer Mhw, Sealight Scoparc S1 H11 Lumens, Caprifig Vs Edible Fig, Progresso Chicken Tortilla Soup Nutrition, Electric Adjustable Corner Desk, Yes Like It Is Live At The Bristol Hippodrome, Applying Critical Thinking, Hella Led Rear Combination Lights, Guinness Beer Alcohol Content, | {
"domain": "knxshop.se",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812309063186,
"lm_q1q2_score": 0.846439985719634,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 586.5570516960669,
"openwebmath_score": 0.774044930934906,
"tags": null,
"url": "https://mag.knxshop.se/what-is-xbkz/a91fa9-reflexive-closure-example"
} |
metrics, such as the L1 metric (Manhattan Distance), the L2 metric (Euclidean Distance) and the Vector Cosine Angle Distance (VCAD) have been proposed in the literature for measuring similarity between feature vectors [6]. Chord distance is Euclidean distance calculated on normalized species data. it is by using Euclidean distance matrices (EDM): for a quick illustration, take a look at the "Swiss Trains" box. Newbie: Euclidean distance of a matrix??. You can come up with dozens of examples. Here is my code. Euclidean Distance Matrices: A Short Walk Through Theory, Algorithms and Applications IvanDokmani´c,MirandaKrekovi´c,RezaParhizkar,JuriRanieriandMartinVetterli. euclidean: logical. This system of geometry is still in use today and is the one that high school students study most often. K-Means Clustering Tutorial. Defaults to FALSE. 0) 2 = i suitable for non-Euclidean space, and w 2 = o suitable for Euclidean space; we confine ourselves to the second, and will call the indicated | {
"domain": "assistimi.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639686018702,
"lm_q1q2_score": 0.8352183251085828,
"lm_q2_score": 0.8596637505099168,
"openwebmath_perplexity": 850.1357934303303,
"openwebmath_score": 0.6910642385482788,
"tags": null,
"url": "http://assistimi.it/eyzg/euclidean-distance-in-r-example.html"
} |
Since, $$\mathrm{arsinh}\left(\dfrac{1}{2}\right)=\ln\left(\dfrac{1}{2}+\dfrac{\sqrt{5}}{2}\right)$$ then,
$I=\dfrac{\pi^2}{12}-\dfrac{1}{2}\mathrm{Li}_2\left(\dfrac{3}{2}-\dfrac{\sqrt{5}}{2}\right)-\dfrac{1}{2}\left(\ln\left(\dfrac{1}{2}+\dfrac{\sqrt{5}}{2}\right)\right)^2$
Since , $$\mathrm{Li}_2\left(\dfrac{3}{2}-\dfrac{\sqrt{5}}{2}\right)=\dfrac{\pi^2}{15}-\left(\ln\left(\dfrac{1}{2}+\dfrac{\sqrt{5}}{2}\right)\right)^2$$ then,
$I=\dfrac{\pi^2}{12}-\dfrac{\pi^2}{30}=\boxed{\dfrac{\pi^2}{20}}$
- 1 year, 5 months ago
Nice. A bit of integration by parts makes the earlier stage a little clearer, perhaps... | {
"domain": "brilliant.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9518632302488963,
"lm_q1q2_score": 0.8383983443917405,
"lm_q2_score": 0.8807970701552505,
"openwebmath_perplexity": 4471.129323603746,
"openwebmath_score": 0.9999955892562866,
"tags": null,
"url": "https://brilliant.org/discussions/thread/brilliant-integration-contest-season-3-part-2/"
} |
python, beginner, python-2.x, tic-tac-toe
Title: Console Tic Tac Toe So I started Python this week, and I never programmed a game before. Even though Tic Tac Toe is probably the simplest game ever, I had some challenges while coding the game rules. I split my project in 4 files : board.py, game.py, main.py, ui.py. I think my file content is self-explanatory enough that I don't need to explain the purpose of each of them.
board.py
import numpy as np
# The board is a zero-based index 2D array
# The X player is represented using 1
# The O player is represented using -1
# Empty cells are represented using 0
class Board:
def __init__(self):
self.__board = np.array([[0, 0, 0], [0, 0, 0], [0, 0, 0]])
def isFull(self):
boardShape = np.shape(self.__board)
for rowIndex in xrange(boardShape[0]):
for colIndex in xrange(boardShape[1]):
if self.__board[rowIndex, colIndex] == 0:
return False
return True | {
"domain": "codereview.stackexchange",
"id": 26863,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-2.x, tic-tac-toe",
"url": null
} |
c#, image, winforms, graphics, genetic-algorithm
//Populate the Pool
public GenePool()
{
CreatePool();
}
public void CreatePool()
{
for (int i = 0; i < numberOfGenomes; i++)
{
Pool[i] = new Genome();
}
} | {
"domain": "codereview.stackexchange",
"id": 33349,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, image, winforms, graphics, genetic-algorithm",
"url": null
} |
control, ros-humble, ros2-control, hardware-interface
Title: Custom hardware interface type I would like to write a controller that needs all joint states to update a single joint.
My idea was to create a class MyStateInterface which inherits from hardware_interface::StateInterface and stores all information for each joint. Then, I would like to export this class inside the hardware interface to pass the joint information to the controller.
To make it clear, I modify this example:
std::vector<double> hw_states_;
CallbackReturn MyRobotHardware::on_init(const hardware_interface::HardwareInfo & info) {
// set some default values when starting the first time
hw_states_.resize(info_.joints.size(), 0.0);
return CallbackReturn::SUCCESS;
}
std::vector<hardware_interface::StateInterface>
MyRobotHardware::export_state_interfaces()
{
std::vector<hardware_interface::StateInterface> state_interfaces; | {
"domain": "robotics.stackexchange",
"id": 38983,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "control, ros-humble, ros2-control, hardware-interface",
"url": null
} |
Your arguments for uncountable and not dense look good to me. As far as showing $[0,1]-E$ is open, I think for simplicity since you know that $d_N\not\in\{4,7\}$, and we're dealing with integers, take $$\delta<\frac{1}{10^{N+2}}.$$ Then if $y$ is such that $|x-y|<\delta$ you know that $y$ has to agree with $x$ at $d_N$, and thus $y\not \in E$.
I believe that your argument for $E$ being perfect is correct as well :)
As you mentioned, for any number in [0,1] - E there is some decimal place which is not 4 or 7. The closest number in E would have a 4 or 7 in that place. Maybe this is not mathematical enough, but could I say that if the two numbers differ at decimal place N, and the next decimal place for one of the numbers is either 4 or 7, then the difference between the 2 numbers must be at least $2/10^{n+1}$? Therefore the set of numbers $\notin E$ is open. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806506825456,
"lm_q1q2_score": 0.8171419657828309,
"lm_q2_score": 0.8333245870332531,
"openwebmath_perplexity": 64.184120653105,
"openwebmath_score": 0.9254941940307617,
"tags": null,
"url": "https://math.stackexchange.com/questions/1715378/prob-17-chap-2-in-baby-rudin-the-set-of-all-numbers-in-0-1-with-only-4"
} |
How do you deduce that the triangle is isosceles? Please show your work.
As for why the first statement is not sufficient. All we know that one of the legs is 5, nothing else. HOW are you going to find BD? BD could take ANY length.
_________________
Intern
Joined: 31 Aug 2015
Posts: 2
Re: If angle BAD is a right angle, what is the length of side [#permalink]
### Show Tags
17 May 2016, 10:10
Bunuel Thanks for your reply. Median from Angle BAD will divide the hypotenuse BD into two halves. And, from statement 1 we know that AC is perpendicular to BD so AC satisfies both conditions of being a perpendicular and a bisector. Therefore from these two conditions we know that Triangle BAD is isosceles triangle. Therefore, side AB is also 5 and it makes side BD as 5√2.
Re: If angle BAD is a right angle, what is the length of side [#permalink] 17 May 2016, 10:10
Go to page 1 2 Next [ 27 posts ]
Display posts from previous: Sort by
# Events & Promotions | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9213576144970795,
"lm_q1q2_score": 0.810008571422812,
"lm_q2_score": 0.8791467706759584,
"openwebmath_perplexity": 1271.148772051905,
"openwebmath_score": 0.7576377987861633,
"tags": null,
"url": "https://gmatclub.com/forum/if-angle-bad-is-a-right-angle-what-is-the-length-of-side-105559.html"
} |
java
// use this instead
public String getEveningStartTime() {
// here's hoping you get to rename the field names too
return horarioTIni;
}
Also, you mentioned the getters only, so I guess there's no excuse for nNoE(). :) Reading it as isNotNullAndEmpty() is easier on the brains.
Avoiding code repetition
If you take a closer look at what you're doing now, it really boils down to these steps:
Define a 'duration description' (DD) as a start time, an optional separator, and an end time. The separator is required when both times are present.
Construct a DD for the AM session.
If there are DDs for both AM and PM sessions, insert the newline.
Construct a DD for the PM session.
Concatenate the DDs for both sessions with the optional newline in between.
Therefore, you can extract step 1 as a method:
// this can be made a class field
private static final String SEPARATOR = " - "; | {
"domain": "codereview.stackexchange",
"id": 16436,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
homework-and-exercises, field-theory, representation-theory, lorentz-symmetry, spinors
Title: How to build an antisymmetric selfdual tensor out of two 4-vectors? In problem C of section 1.4 of Ramon's Field Theory: A Modern Primer, we are asked to build a field bilinear in $\chi_L$ and $\psi_L$, two left-handed weyl spinors, which transforms as the (1,0) representation of $\text{SL}(2,\mathbb{C})$. This representation is equivalent to the behavior of rank 2 tensors $B_{\mu\nu}$ which are antisymmetric and selfdual, i.e., $$B_{\mu\nu}=-B_{\mu\nu}\\B_{\mu\nu}=\frac{1}{2}\epsilon_{\mu\nu\rho\sigma}B^{\rho\sigma}.$$ | {
"domain": "physics.stackexchange",
"id": 54439,
"lm_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, field-theory, representation-theory, lorentz-symmetry, spinors",
"url": null
} |
6. ## Re: Red marbles, white marbles, in a bag.
I think I understood. I mean I can place the logic in my head now. Let's see if I got this right.
In a bag with 10 white marbles and 3 red marbles I take 7 without replacement:
Finding the probabilities of getting 1 red marble means comparing the number of ways I can obtain exactly 1 red marble and 6 white marbles (desirable outcome) when drawing 7 marbles to all possible outcomes when drawing 7 marbles.
A. First I calculate the number of all possible combinations when taking 7 out of 13.
${13\choose7} \,=$ (13!)/(7!)(13-7)!= 1,716 possible combinations
Then I calculate the number of ways I can obtain my desirable outcome of 1 red and 6 white, which is the number of combinations for obtaining 1 red out of 3 multiplied by the number of combinations for 6 out of 10 white.
${3\choose1}{10\choose6} \:=$((3!)/(1!)(3-1)!)*((10!)/(6!)(10-6)!) = (3)(210) = 630 ways of obtaining the desirable outcome
Then I calculate P which is | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682474702956,
"lm_q1q2_score": 0.8771510012349366,
"lm_q2_score": 0.8872045840243196,
"openwebmath_perplexity": 594.0990940281878,
"openwebmath_score": 0.8643590807914734,
"tags": null,
"url": "http://mathhelpforum.com/statistics/199623-red-marbles-white-marbles-bag.html"
} |
complexity-theory, np, complexity-classes
Interestingly, when the number is prime, there isn't such a trivial hint that let's you prove the answer is NO. (There are hints, but nowhere near as simple).
And co-NP is defined almost the same, except there must be a hint if the answer is NO. For every problem X in NP, you can pose the problem Y: "Is the answer to problem X NO", and that problem Y would be in co-NP by definition. | {
"domain": "cs.stackexchange",
"id": 7687,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, np, complexity-classes",
"url": null
} |
thermodynamics, energy, dimensional-analysis
with Gibbs free energy $G$, entropy $S$, temperature $T$, volume $V$, pressure $P$, chemical potential or partial molar Gibbs free energy $g_i$ for species $i$, and amount $n_i$ of species $i$.
Now assume ideal gases for a gas system ($P_iV=n_iRT$), or alternatively ideal-gas vapor at equilibrium above condensed matter. With no chemical interactions, the Gibbs free energy of any one component can depend only on that component. At any particular temperature ($dT=0$) for a closed system ($dn_i=0$), therefore, we have
$$dG_i=V\,dP_i=\frac{n_iRT}{P_i}dP_i=n_iRT\,d\ln P_i,$$
where $P_i$ is normalized by some reference pressure to make the logarithmic argument dimensionless.
Integrating, we have
$$G_i-G_{i}^\circ=n_iRT\ln P_i;$$
$$G_i=n_i\left(RT\ln P_i+g_i^\circ(T)\right),$$ | {
"domain": "physics.stackexchange",
"id": 93221,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, energy, dimensional-analysis",
"url": null
} |
particle-physics, antimatter
Here is a discussion of the atomic orbitals, the probable locations of the electrons about the nucleus. In the molecule you envisage, the orbital of the antihydrogen positron has a high probability to overlap with an electron orbital , and annihilating into two photons. The antiproton, because of its large mass will have an orbital within the nucleus, with high probability of annihilating with a proton or neutron.
Muonic atoms) give an experimental confirmation of what happens when heavier particles take over the(n,l,m) of an electron orbital. | {
"domain": "physics.stackexchange",
"id": 81511,
"lm_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, antimatter",
"url": null
} |
energy-conservation, harmonic-oscillator, potential-energy, spring, free-body-diagram
Title: Trouble reconciling conservation of energy on vertical mass-spring I'm picturing a vertical mass-spring system. This system is at rest at its equilibrium point. If we pull the mass downward, we remove potential energy from it. If we let go, ut will have no kinetic energy and a minimum potential emergy for a moment. The spring will have energy stored at this point.
As the mass goes upward to the equilibrium point, the spring loses all its stored energy, the mass gains maximum kinetic energy, and the mass gains potential energy. I find no trouble here. If we continue, the mass will continue upward to a distance from the equilibrium point approximately equal to the distance we pulled it down initially. Now, the block will have maximum potential energy, as it is highest off the ground, the block will have no potential energy, and the spring will have maximum potential energy stored again. | {
"domain": "physics.stackexchange",
"id": 37292,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy-conservation, harmonic-oscillator, potential-energy, spring, free-body-diagram",
"url": null
} |
php, beginner, strings
Title: Splitting three comma-delimited strings I've been reading about loops this morning, to try to improve this snippet of code:
$deliveryoutcode1 = array();
$deliveryoutcode1 = explode(",",$rows['deliveryoutcode1']);
$deliveryoutcode2 = array();
$deliveryoutcode2 = explode(",",$rows['deliveryoutcode2']);
$deliveryoutcode3 = array();
$deliveryoutcode3 = explode(",",$rows['deliveryoutcode3']);
I started to read about loops this morning and I came up with this:
$i=1;
while ($i <= 3) { // Output values from 0 to 3
$deliveryoutcode[$i] = array();
$deliveryoutcode[$i] = explode(",",$rows['deliveryoutcode' . $i . '']);
$i++;
} | {
"domain": "codereview.stackexchange",
"id": 12063,
"lm_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, beginner, strings",
"url": null
} |
spherical-astronomy
I think one approximate way is to use the moon's coordinate for two subsequent days and then we can calculate the cross product of both vectors to get the plane' normal which can be used to calculate the intersection coordinate. Is there a better accurate way? It can be done with coordinates from any two different times. A difference more than one day should give acceptable results. The Moon's ecliptic latitude is a sinusoid with a period that's well known (27.40803 days). Combining that given with the ecliptic longitudes and latitudes of the two observations the time difference between the time of the first observation and the time of passing the ascending node can be determined. That time and the moon's known orbital angular velocity give the angular difference between the ascending node and the ecliptice longitude of the first observation. Then rearranging the first equation under "Finding t1" finds the Moon's orbital obliquity. | {
"domain": "astronomy.stackexchange",
"id": 6855,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "spherical-astronomy",
"url": null
} |
turing-machines, universal-turing-machines
First of all there are no "natural" quadratic lower bounds with respect to multi-tape Turing machines (see e.g. K.W.Regan, On Superlinear Lower Bounds in Complexity Theory). So the approach, find an $O(n^2)$ problem on a 1-tape Turing machine that cannot be solved faster on a 2-tape TM would imply a major breakthrough. | {
"domain": "cstheory.stackexchange",
"id": 5053,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turing-machines, universal-turing-machines",
"url": null
} |
natural-language-processing, natural-language-generation
Repeat steps 2-4 until you reach the desired sentence length or a suitable stopping condition. | {
"domain": "ai.stackexchange",
"id": 3845,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "natural-language-processing, natural-language-generation",
"url": null
} |
laws-of-physics
Title: How do you interpret the product of two components? I hope this isn't borderline philosophy. It is really difficult for me to articulate the question and so Google was of no use to me. The question spawned when I was learning laws of conservation of energy, because although I can calculate the answers I don't understand why things like mgh (mass times gravity times height) are able to give us numbers that we can use to plug into other formulas for combining energies into totals.
Let's say we have 2 components, A and B.
A/B is the number of A per B, such as m/s.
Therefore if he have A= 10m and B = 5 seconds, we can determine that A/B is 2 meters per second.
I used this try and understand what products yield.
A times B is A of B's or B of A's.
Such as A=5, B=6, A times B is 30, or five sixes or six fives.
Now if we go back and multiply 10m by 5s, we get 50 ms.
How do you interpret 50 meter seconds or 50 second meters. What is that?
Any references for me to read would be cool too. | {
"domain": "physics.stackexchange",
"id": 11824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "laws-of-physics",
"url": null
} |
Here's a proof that the probability in part (a) is 1/2. It's the same as the one in The Math Troll's and chandu1729's answers, but with more details filled in. I want to emphasize that it really is a proof, as rigorous as anything you're likely to encounter in an introductory probability course, even though it doesn't use any formulas or complicated calculations.
Let's say two arrangements are partners if exchanging the positions of A and B turns one into the other. Here are some examples of arrangements which are partners:
ABCDEFGHIJKLMNOPQRSTUVWXYZ and BACDEFGHIJKLMNOPQRSTUVWXYZ AEIOUYBCDFGHJKLMNPQRSTVWXZ and BEIOUYACDFGHJKLMNPQRSTVWXZ THEQUICKBROWNFXJMPSVLAZYDG and THEQUICKAROWNFXJMPSVLBZYDG
You should be able to convince yourself that:
• Every arrangement has exactly one partner.
• If an arrangement has A before B, its partner has B before A, and vice versa. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474888461861,
"lm_q1q2_score": 0.883793416237481,
"lm_q2_score": 0.8933094046341532,
"openwebmath_perplexity": 300.8157627126416,
"openwebmath_score": 0.8802695870399475,
"tags": null,
"url": "https://math.stackexchange.com/questions/1056982/probability-a-is-before-b-when-the-26-letters-are-arranged-randomly"
} |
of matrices. Tanvir Prince 1,, Nieves Angulo 1. Arrange these two windows so that they overlap and you can move easily back-and-forth between them by clicking on the exposed portion of the inactive window to make it active. eig(K) How can I print just eigenvectors of len(K). Recall some basic de nitions. He literally 'saw' four eigenvectors! An eigenvector of a square matrix M is a nonzero vector v such that. Every vector is associated with a value λi xi: Eigenvectors or Characteristic vectors λi: Eigenvalues. The Hamiltionian matrices for quantum mechanics problems are Hermitian. We will obtain the eigenvalues and eigenvectors of a matrix with the eigvals() and eig() functions of the numpy. One of the most interesting topics to visualize in Linear Algebra are Eigenvectors and Eigenvalues. Eigenvectors: For symmetric matrices such as this one, it is possible to define three special, mutually perpendicular directions, called eigenvectors 1, 2, and 3 and three corresponding numbers, | {
"domain": "ligk.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429116504951,
"lm_q1q2_score": 0.8098915814943689,
"lm_q2_score": 0.8221891370573388,
"openwebmath_perplexity": 803.9310905847997,
"openwebmath_score": 0.7181374430656433,
"tags": null,
"url": "http://nzkp.ligk.pw/eigen-vector1f.html"
} |
javascript, beginner, jquery
var employeeCounts = {}; // empty object
// create key/value pairs for each school
for(var i = 0, l = schools.length ; i < l ; i++) {
employeeCounts[schools[i]] = 0;
}
Or, if you want to be fancy and use reduce you can do:
var employeeCounts = schools.reduce(function (memo, name) {
memo[name] = 0;
return memo;
}, {});
In either case, you end up with an object with all the school names as keys, and zeros for the counts.
Now, when you parse the other data, you can do this:
var NOT_GIVEN = '(Ikke oppgitt)'; // stick this in a "constant" to avoid repeating it
for(var i = 0, l = this.data.length ; i < l ; i++) {
var schoolName = this.data[i].Master.lookupValue;
if(schoolName === NOT_GIVEN) {
schoolName = this.data[i].Bachelor.lookupValue;
} | {
"domain": "codereview.stackexchange",
"id": 10225,
"lm_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, jquery",
"url": null
} |
quantum-mechanics, quantum-field-theory, experimental-physics
Title: Probability of Vacuum Fluctuations near Charges A short, simple enough question, if you know about field theory, which unfortunately I don't.
Are vacuum fluctuations more probable near a charge, for example an electron with negative charge?
I think this is one of the problems the renormalization procedure resolves, but if they are more probable, is there a clear mechanism for this? Are vacuum fluctuations more probable near a charge, for example an electron with negative charge?
I'm going to say no, because renormalization is more to do the virtual particles of QED rather than vacuum fluctuations. As for virtual particles, see Matt Strassler's article and note this:
"The best way to approach this concept, I believe, is to forget you ever saw the word 'particle' in the term. A virtual particle is not a particle at all". | {
"domain": "physics.stackexchange",
"id": 22609,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-field-theory, experimental-physics",
"url": null
} |
python, python-2.x
def force_centripetal( mass , velocity, radius ):
'''Centripetal Force Given Mass, Velocity, and Radius'''
return ( ( mass * velocity * velocity ) / float(radius) )
def force_friction(**fields):
'''Force of Friction based upon normal force, friction coefficient and mass'''
missing_argument = find_missing_argument(['normal_force',
'friction_coefficient',
'mass'], **fields)
# This function expects one missing argument, and will calculate that one
if missing_argument is None:
raise AttributeError('Found all fields, don\'t know what to do'.format(missing_argument))
# Do calculations
if missing_argument is 'mass':
return fields['normal_force'] * fields['friction_coefficient']
elif missing_argument is 'normal_force':
return fields['mass'] * C.F_GRAVITY * fields['friction_coefficient'] | {
"domain": "codereview.stackexchange",
"id": 16066,
"lm_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-2.x",
"url": null
} |
python, rviz, ros-kinetic
Originally posted by PeteBlackerThe3rd with karma: 9529 on 2019-01-31
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Hakaishin on 2019-01-31:
Awesome, thank you very much. This was a classical XY problem. Is there a way to keep publish point on? Right now I have to press publish point again and again. I plan on doing it often per bag.
Comment by PeteBlackerThe3rd on 2019-01-31:
I don't think there's any way of capturing mouse button down and up clicks that would let you capture intervals. You could potentially hack something together so that a double click started an interval and a single click ended it. That could be done just using the point_clicked topic.
Comment by PeteBlackerThe3rd on 2019-01-31:
It's not the most elegant solution but it could be thrown together very easily. | {
"domain": "robotics.stackexchange",
"id": 32372,
"lm_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, rviz, ros-kinetic",
"url": null
} |
php, object-oriented, sql, pdo
a potential vulnerability which I explained recently in the other answer. At the very least all identifiers must be formatted according to database rules.
select is unusable in the real life. Nobody have seen such a method in the wild, it lurks only in such educational builders. If you want a query builder for SELECT, then either create a real one, with distinct methods for each SQL clause, or stick to a free-form query() method. Trust me, SQL is a precious and powerful programming language, do not diminish it to a crippled gibberish.
Also
Looks like class variables beside $db are just for decoration, cause they never used in the code? And for the good, so just ditch them away.
consider implementing PSR-4 Autoload for your classes.
usually, the data format for such methods as insert and edit is like
'col1' => value1,
'col2' => value2, | {
"domain": "codereview.stackexchange",
"id": 31241,
"lm_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, object-oriented, sql, pdo",
"url": null
} |
c++, performance, algorithm
auto data = sensor_data{};
while (parse_json_sensor_data(file, data))
{
// ... [snip] ...
}
}
Note we can take it by value because we’re not just reading it, we’re also modifying it.
Now, you have a bug in your code:
for(auto i = csvData.begin(); i != csvData.end(); ++i){
// ... [snip] ...
csvData.erase(i);
// ... [snip] ...
} | {
"domain": "codereview.stackexchange",
"id": 40382,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, performance, algorithm",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.