text stringlengths 1 1.11k | source dict |
|---|---|
ros
Download source from github.com/ros-drivers/joystick_drivers
unzip wiimote folder into /opt/ros/groovy/share/wiimote
build and install:
cd /opt/ros/groovy/share/wiimote
mkdir build
cd build
cmake ../
make
make install
start wiimote node: rosrun wiimote wiimote_node.py
Originally posted by miniME with karma: 36 on 2013-02-24
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 13032,
"lm_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
} |
thermodynamics, entropy, reversibility
Once again, this suggests that the left-hand side of the Clausius inequality is the negative of the change in entropy of the reservoirs that is brought about by exchange of energy via heating with the system (that is undergoing a cycle).
A non-Carnot cycle operating between only two temperatures
Let's consider one of the simplest cases, which is the Otto cycle. The Otto cycle consists of an adiabatic compression (Processes 1), and adiabatic expansion (Process 3), and two isochors (Processes 2 and 4). During the adiabatic processes, no energy is exchanged by heating. Therefore, the change in entropy of the reservoirs brought about by exchange of energy via heating with the system is
\begin{align}
\oint \frac{\delta Q_{\text{res}}}{T_{\textrm{res}}} =
\int_{2} \frac{\delta Q_{\text{res}}}{T_{\textrm{res}}}+\int_{4} \frac{\delta Q_{\text{res}}}{T_{\textrm{res}}}
=\frac{Q_{\text{cold}}}{T_{\textrm{C}}} + \frac{Q_{\text{hot}}}{T_{\textrm{H}}} | {
"domain": "physics.stackexchange",
"id": 26282,
"lm_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, entropy, reversibility",
"url": null
} |
It will also help you to grab the most important topics and expected NDA maths questions for the upcoming exam by the author's view. Statistics Formulas. Zero matrix =(0,0), , etc. The math answers are generated and displayed real-time, at the moment a web user types in their math problem and clicks "solve. COMMON MATH FORMULAS MISCELLANEOUS FORMULAS Simple Interest + L L N P where I = interest, p = principal, r = interest rate, and t = time Distance @ L N P where d = distance, r = rate, and t = time Total Cost (Number of Units) x (Price per Unit). Trigonometry. And, you need these formulas in your exams. Solving Mixture Word Problems. 1300 Math Formula (1) Algebra (6) Arithmetic (পাটীগণিত) (3) Bangla PDF Book (21) BCS Preparation (8) Calculator & Tools (6) Class Ten (2) Exam Preparation (5) gonit olympiad (1) Hindu_Dhormo (1) HSC (2) Islam (1) math solution (1) Math Symbol (3) Math Tips and Tricks (3) PDF Book West Bengal (2) Prize Bond (1) Result (3. Important GRE Math Formulas. The | {
"domain": "podistiagnadello.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399026119352,
"lm_q1q2_score": 0.8167728340055909,
"lm_q2_score": 0.8418256472515683,
"openwebmath_perplexity": 2224.0756255834276,
"openwebmath_score": 0.6267150044441223,
"tags": null,
"url": "http://wgml.podistiagnadello.it/math-formulas-pdf.html"
} |
nxt, catkin, ros-fuerte, ros-groovy, rosbuild
Originally posted by joq with karma: 25443 on 2013-06-02
This answer was ACCEPTED on the original site
Post score: 10 | {
"domain": "robotics.stackexchange",
"id": 14394,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nxt, catkin, ros-fuerte, ros-groovy, rosbuild",
"url": null
} |
php, laravel
* @param array $params Period, Project Name, Project ID, From Email Address, Company Name, Subject
* int Period Number of weeks to check back for recipient validation
* string Project Name Name of this project
* int Project Id ID of this project
* string From Email Address Email to be sent from
* string Company Name Name of company sponsoring this awareness test
* string Subject Subject of email
* @throws OutOfBoundsException Thrown from setEmailEnvironmentSettings if a setting is not valid
* @throws FailureException Thrown from sendEmail() if mail fails to be given to mail server | {
"domain": "codereview.stackexchange",
"id": 20959,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, laravel",
"url": null
} |
c#, asp.net, asp.net-web-api, asp.net-mvc-5
var formatter = FindFormatter(formatters);
if (formatter != null && request.Headers.UserAgent.Any(x => x.Product != null
&& x.Product.Name.Equals("chrome", StringComparison.OrdinalIgnoreCase)))
{
// if client is chrome then return superproduct and use custom formatter for it
return new ContentNegotiationResult(formatter,
new MediaTypeHeaderValue(mediaType));
}
else
{
return base.Negotiate(type, request, formatters);
}
}
} | {
"domain": "codereview.stackexchange",
"id": 16448,
"lm_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#, asp.net, asp.net-web-api, asp.net-mvc-5",
"url": null
} |
traffic-light, highway-engineering
Title: What are the pros and cons of a traffic circle versus a traffic light intersection? The debate of traffic circles (also called roundabouts or rotaries) versus traffic light intersections has been in progress for a while. Those in favor of traffic circles say that, among other things, that they are safer than traffic light intersections. This claim has been scientifically proven. On the other hand, traffic light intersections are more space-inefficient.
Even Mythbusters has joined the fun, testing the efficiency (which is one of the main arguments both sides seem to concern themselves with) of each method.
For comparison, here's a quick picture of a traffic circle:
And of a four-way traffic light intersection: | {
"domain": "engineering.stackexchange",
"id": 2690,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "traffic-light, highway-engineering",
"url": null
} |
Setting $$a=0$$ gives the maximum value $$\sqrt{6+\dfrac{1}{4}}=\dfrac{5}{2}$$.
I don't know if it's okay to set $$b=0$$ since $$z$$ would become a real number then.
• The real numbers are a subset of the complex numbers. That a possible values of $z$ has an imaginary part of $0$ (a.k.a. $0i$), does not make it non-complex. This is much like the way that all integers are also rationals (and reals, and complex). – John Bollinger Oct 10 '18 at 1:45
A (very) faster way:
We know that $$z$$ is in the circle centered at $$0$$ and radius $$2$$ and $$1/z$$ is in the circle of center $$0$$ and radius $$1/2$$. The maximum distance between a point of the former and a point of the latter is $$2+\frac12=\frac52$$ Now, we need to show that there exists some $$z$$ such that this distance is reached. Take $$z=2i$$.
Can you deal with the minimum now? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806512500485,
"lm_q1q2_score": 0.8254779453122089,
"lm_q2_score": 0.8418256512199033,
"openwebmath_perplexity": 164.18763079259284,
"openwebmath_score": 0.9396674036979675,
"tags": null,
"url": "https://math.stackexchange.com/questions/2948812/maximum-and-minimum-absolute-value-of-a-complex-number/2948819"
} |
c++, recursion, template, lambda, c++20
The testing code
In the following Godbolt link, the testing code is divide into three parts: unary_test_cases, binary_test_cases and ternary_test_cases.
A Godbolt link is here.
unary_test_cases and binary_test_cases are similar to the previous posts.
Let's check ternary_test_cases:
void ternary_test_cases()
{
std::cout << "*****ternary_test_cases*****" << std::endl; | {
"domain": "codereview.stackexchange",
"id": 41713,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, recursion, template, lambda, c++20",
"url": null
} |
data-cleaning
{"distinguished":null,"id":"c0299b7","subreddit_id":"t5_6","downs":0,"archived":true,"parent_id":"t3_5yba3","created_utc":"1192450748","ups":1,"controversiality":0,"edited":false,"subreddit":"reddit.com","author_flair_css_class":null,"name":"t1_c0299b7","retrieved_on":1427426409,"score":1,"link_id":"t3_5yba3","author":"hfaber","body":"hm?","score_hidden":false,"author_flair_text":null,"gilded":0}
{"subreddit":"reddit.com","edited":false,"retrieved_on":1427426409,"name":"t1_c0299b8","author_flair_css_class":null,"score":1,"link_id":"t3_5yba3","author":"paternoster","author_flair_text":null,"gilded":0,"score_hidden":false,"body":"I think so...","id":"c0299b8","subreddit_id":"t5_6","distinguished":null,"archived":true,"downs":0,"parent_id":"t1_c0299b2","created_utc":"1192450770","ups":1,"controversiality":0} | {
"domain": "datascience.stackexchange",
"id": 567,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "data-cleaning",
"url": null
} |
python, game, python-2.x
current_date = datetime.datetime.strftime(datetime.date.today(), "%m-%d-%Y")
print "Welcome to a Python version of Plague Inc."
user = raw_input('\nWhat is your name? ').title() # for later on in the game
print '\nCountries to choose from are\n'
print "Country".ljust(15),"Population\n"
for country in countries:
print country["Name"].ljust(15), country["Population"]
startcountry = raw_input('\nWhat country would you like to start in? ').title()
if startcountry == 'Random': # random.sample can be used for more than one country later on
startcountry = random.choice(countries)
diseasename = raw_input('\nWhat would you like to name your disease? ').title()
print '\nNews Bulletin'.ljust(45), current_date
print '-' * 55
print 'An unknown disease named', diseasename, 'has struck', startcountry, 'by storm.'
print 'Doctors and scientists will need to collaborate to find out more information about this disease.' Some thoughts: | {
"domain": "codereview.stackexchange",
"id": 7343,
"lm_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, game, python-2.x",
"url": null
} |
javascript, google-apps-script, google-sheets
SpreadsheetApp.flush();
emailSpreadsheetAsPDF();
}
function emailSpreadsheetAsPDF() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("PDF Creator");
var now = new Date().toString();
var weekCommencing = sheet.getRange("C1").getValue();
var coachEmail = sheet.getRange("C4").getValue();
var coachName = sheet.getRange("A4").getValue();
var agentName = sheet.getRange("A2").getValue();
var agentEmail = sheet.getRange("C2").getValue();
var sendEmail = sheet.getRange("A6").getValue();
var subject = "Quality Scorecard for - "+agentName + " created on: "+now;
var url = ss.getUrl();
url = url.replace(/edit$/,'');
var monthNames = [
"Jan", "Feb", "Mar",
"Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct",
"Nov", "Dec"
];
var day = weekCommencing.getDate();
var monthIndex = weekCommencing.getMonth();
var year = weekCommencing.getFullYear();
var clean = day + ' ' + monthNames[monthIndex] + ' ' + year; | {
"domain": "codereview.stackexchange",
"id": 17987,
"lm_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, google-apps-script, google-sheets",
"url": null
} |
Proposition 2 : For each irrational number $b$, there exists an irrational number $a$ such that $a^b$ is rational.
I got the following :
Proposition 1 is true.
Suppose that both $\frac{\ln 2}{\ln a}$ and $\frac{\ln 3}{\ln a}$ are rational. There exists a set of four non-zero integers $(m_1,m_2,n_1,n_2)$ such that $\frac{\ln 2}{\ln a}=\frac{n_1}{m_1}$ and $\frac{\ln 3}{\ln a}=\frac{n_2}{m_2}$. Since one has $a=2^{m_1/n_1}=3^{m_2/n_2}$, one has $2^{m_1n_2}=3^{m_2n_1}$. This is a contradiction. It follows that either $\frac{\ln 2}{\ln a}$ or $\frac{\ln 3}{\ln a}$ is irrational. Hence, either setting $b=\frac{\ln 2}{\ln a}$ or setting $b=\frac{\ln 3}{\ln a}$ works.
Then, I began to consider if proposition 2 is true.
To prove that proposition 2 is true, it is sufficient to show that for each irrational number $b$, there exists a rational number $c$ such that $c^{1/b}$ is irrational.
This seems true, but I have not been able to prove that. So, my question is the following : | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676478446031,
"lm_q1q2_score": 0.8032229780335675,
"lm_q2_score": 0.8198933381139645,
"openwebmath_perplexity": 148.72516759941345,
"openwebmath_score": 0.9073508977890015,
"tags": null,
"url": "https://math.stackexchange.com/questions/1223725/for-each-irrational-number-b-does-there-exist-an-irrational-number-a-such-t"
} |
frequency, aliasing, sweep
Note on implementation: The last form of $\phi(t)$ can be constructed as
pi*(i*dt)*(f0+interpolate(i,f0,fT,N))
with N=samples and dt=T/N, provided that
interpolate(0,f0,fT,N)==f0 and interpolate(N,f0,fT,N)==fT | {
"domain": "dsp.stackexchange",
"id": 1413,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "frequency, aliasing, sweep",
"url": null
} |
kinematics, rotational-dynamics, friction, rotation
Title: Dynamics of a sphere in a horizontal plane driven by a force I'm studying the dynamics of a sphere in a horizontal plane driven by a force. The situation is the following: I have a stationary sphere of mass $m$ and radius $r$ in a pool table whose lining has coefficients of friction $\mu_k$ and $\mu_s$. The question i have is: Knowing the data mentioned above, despising the rolling resistance, can i calculate the force needed to move the sphere some distance $d$?
If is not possible, Is there any way to get this data without experimenting?.
PD: to contextualize, this study is about an elliptical pool table, where there is one pocket in one of the focus of the ellipse, and the other focus is used as a reference, since each time a ball passes through it with the appropriate force, it will reach the other focus where the pocket is.
Excuse me in advance if there is an error, I am new in physics.
Knowing the data mentioned above, discarding(?) the rolling | {
"domain": "physics.stackexchange",
"id": 52207,
"lm_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, rotational-dynamics, friction, rotation",
"url": null
} |
ros, moveit, ros-melodic, move-group-interface, move-group
Is there a way to fix a start state in rviz that correspond to the initial pose of our robotic arm? will this guarantee that trajectories found on the simulator and the arm will be the same.
edit to the question
I am using move_group_interface and I use the relevant APIs to plan and execute simple goals (pose goal or a joint-space goal). I write a simple launch file which sort of replicates the functionality that comes within demo.launch. In this launch file, I invoke my motion planning node. In rviz, I see the trajectory followed by the ur5. At the startup, the arm appears lying down, and then it follows the path to the desired goal pose. Concerning the initial configuration was all zeros [0,0,0,0,0,0], I checked this, in my code.
std::vector<double> jointVals;
// a joint-space target
double refVals[] = {-3.05938765, -1.2903219, 1.662077, -0.36599554, -1.484228, 3.14752677};
for (int j=0; j<6; j++) {
jointVals.push_back(refVals[j]);
}
move_group.setJointValueTarget(jointVals); | {
"domain": "robotics.stackexchange",
"id": 36146,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, moveit, ros-melodic, move-group-interface, move-group",
"url": null
} |
grovers-algorithm, speedup, deutsch-jozsa-algorithm, oracles
Title: How do we know a "quantum function call" is worth the same amount of time as a "classical function call?" In quantum and classical algorithms, we often need to do "function calls." Quantum algorithms such as Grover's algorithm or the Deutsch–Jozsa algorithm can take a fewer number of function calls than their classical counterparts, and this is often argued as a reason why these algorithms are more efficient. However, I see these arguments as having a gap.
My main question is, how do we know a "quantum function call" is worth the same amount of time as a "classical function call?"
For example, in an unstructured search problem, we have a function $f$ such that $f(x) = 0$ if $x$ is not a solution to our search problem and $f(x) = 1$ if $x$ is a solution to our search problem. In Grover's algorithm, we utilize an oracle $\hat{O}_{f}:|x\rangle\mapsto (-1)^{f(x)}|x\rangle$. | {
"domain": "quantumcomputing.stackexchange",
"id": 3651,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "grovers-algorithm, speedup, deutsch-jozsa-algorithm, oracles",
"url": null
} |
urdf, xacro
setting /run_id to 7db1f390-4d13-11e5-9277-94dbc9b65860
process[rosout-1]: started with pid [11113]
started core service [/rosout]
process[joint_state_publisher-2]: started with pid [11130]
process[robot_state_publisher-3]: started with pid [11131]
[ERROR] [1440718181.920790719]: Error document empty.
state_publisher: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = const urdf::Link; typename boost::detail::sp_member_access<T>::type = const urdf::Link*]: Assertion `px != 0' failed.
process[rviz-4]: started with pid [11145]
[robot_state_publisher-3] process has died [pid 11131, exit code -6, cmd /opt/ros/indigo/lib/robot_state_publisher/state_publisher __name:=robot_state_publisher __log:=/home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/robot_state_publisher-3.log].
log file: /home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/robot_state_publisher-3*.log | {
"domain": "robotics.stackexchange",
"id": 22539,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "urdf, xacro",
"url": null
} |
windows, assembly, variadic
When comparing memory addresses like in your code cmp rdx, rcx, it would be best to not check for equality but rather for excess. Provided the step is non-zero, checking for the 'below' condition will happen eventually while checking for the 'equal' condition might never happen at all (if there's an error in the program of course...).
An even simpler solution uses the ECX register as a counter (like it was on input):
sum:
xor eax, eax
test ecx, ecx
jle .end
mov [rsp + 10h], rdx ; 1st arg for sure (ECX=1+)
mov [rsp + 18h], r8 ; maybe 2nd arg
mov [rsp + 20h], r9 ; maybe 3rd arg
lea rdx, [rsp + 10h] ; lower limit
.more:
add eax, dword [rdx]
add rdx, 8
sub ecx, 1
jnz .more
.end:
ret
We can change how many variables are being given to the function without having to change the amount of memory being allocated to the function itself. | {
"domain": "codereview.stackexchange",
"id": 32318,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "windows, assembly, variadic",
"url": null
} |
electrostatics
You have presumably found, via Gauss's law, that the field outside this infinite rectangular object is finite, pointing away from the surface with magnitude $\frac{\rho e}{2\epsilon_o}$. I've used $e$ as the width, as you did in your drawing.
Let's say we're inside the object, a distance $a$ from the left side. Then we're a distance $e-a$ from the right side. We can divide the object up into two similar objects of width $a$ and $e-a$, and apply Gauss's law to each of these objects individually. By the principle of superposition, the total electric field is just the sum of the fields produced by the two individual objects. We find that the electric field is then
$\vec{E} = (\frac{\rho a}{2\epsilon_0}-\frac{\rho (e-a)}{2\epsilon_0})\hat{x}$
Note that this is finite. Also note that in the exact middle it gives zero, as desired.
You can also do this calculation by doing integrals, which will not diverge. So double-check your math! | {
"domain": "physics.stackexchange",
"id": 25983,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics",
"url": null
} |
redox
Eventually under (very) basic conditions, the reaction will stop already at a green colour in form of oxidation state $\ce{Mn^{6+}}$:
$$ \ce{MnO4^- + e^- -> MnO4^{2-}} $$
Paying attention to this has practical, preparative relevance, too. It offers one way to attune the oxidation power of potassium permanganate. A moderated reactivity often correlates with selectivity of the reactions.
This pH-dependence of oxidation-reduction reactions correlates with electrode potentials which often are already tabulated, like here or in the CRC Handbook of Chemical and Physics (keyword Nernst equation).
As a side note: These equations sometimes do not tell the complete story. $\ce{MnO2}$, for example, may act / may be used itself as oxidiser. The simple sum formula however hides well that the oxidising power of this material depends how this material was prepared, too. | {
"domain": "chemistry.stackexchange",
"id": 8020,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "redox",
"url": null
} |
automata, finite-automata
Title: In a DFA, does the restriction for a total transition function apply to accepting states? I recently discovered the idea of a total transition function in Automata Theory. To my understanding this means that every state has at least one outgoing state.
My question is whether this restriction applies to accepting states, since my initial intuition tells me that this would be an overly strict enforcement of the state machine.
Thanks in advance for any answers. Unfortunately there seem to be several different definitions of DFAs in the literature. Here is the classical definition: | {
"domain": "cs.stackexchange",
"id": 8410,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "automata, finite-automata",
"url": null
} |
titration, density
The other wrinkle here is that mixing exact stoichiometric proportions is impossible. If an anhydrous solution was wanted, then an excess of acetic anhydrous would be used or some other means to dry the solution would be necessary.
Never the less, let's blunder through some sort of solution, as poor as the problem is...
Assume that the volumes are additive. | {
"domain": "chemistry.stackexchange",
"id": 13697,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "titration, density",
"url": null
} |
star, the-sun, history
“The composition of our own star and world is the same as that of as many other stars and worlds as we can see.” | {
"domain": "astronomy.stackexchange",
"id": 5111,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "star, the-sun, history",
"url": null
} |
OpenStudy (gg):
I made mistakes in calculation :) I got A/24 for second integral :) thank ev ruy much :) can I send u more problems?
OpenStudy (gg):
is 1 value of $F _{_{Z}}(z)$ if z>1 or if z>2?
OpenStudy (zarkon):
sorry...typo... $F_Z(z)=\left\{\begin{array}{rl} 0,& \text{if }z<1 \\\frac{z^4-1}{15},& \text{if }1\leq z\leq2\\ 1,&\text{if }z>2\end{array}\right.$
OpenStudy (gg):
thanks :) would u help me with few problems more? | {
"domain": "questioncove.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429565737233,
"lm_q1q2_score": 0.8278033189368282,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 2972.6203391987624,
"openwebmath_score": 0.8979480266571045,
"tags": null,
"url": "https://questioncove.com/updates/4e5a20e80b8b1f45b47c93c3"
} |
c++, strings
and you don't need to do anything in the derived classes (their destructors will automatically be virtual if the base class destructor is). Making the destructor virtual is essentially free if you already have other virtual functions, and it will prevent nasty, hard-to-diagnose bugs.
As for the interface you've chosen for your policy class, I know it's basically what I tossed out when brainstorming the idea, but when you stop to think about it... are all these functions really necessary in the base class interface?
The base case for transforming a text string seems pretty basic - in fact, it's pretty much just std::transform(), right? You could literally do an upper case transformation using std::transform() and your to_upper() function like this:
template <typename String>
auto uppercase(String text)
{
using std::begin;
using std::end;
std::transform(begin(text), end(text), begin(text), to_upper);
return text;
} | {
"domain": "codereview.stackexchange",
"id": 31204,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, strings",
"url": null
} |
c. the student made an algebraic mistake when solving the system of equations. They said:
$$y=x+30=90-x$$
$$2x=120$$
$$x=60$$
d. correct!
Question 3
Given:
$$x=\frac{2}{t-3}$$
and
$$y=\frac{1}{t+5}$$
eliminate the parameter, and choose the correct graph.
a.
b.
c.
d.
Solution 3
1) To eliminate the parameter, the most efficient way is to isolate the t in the x-t equation.
$$x=\frac{2}{t-3}$$
$$t=\frac{2}{x}+3$$
2) Then substitute the t in the y-t equation
$$y=\frac{1}{t+5}$$
$$y=\frac{1}{\frac{2}{x}+8}$$
3) simplify to:
$y=\frac{x}{\2+8x}$
This is a review on graphing rational functions
VA=
$\frac{-1}{4}$
(set denominator equal to 0 and solve)
HA=
$$\frac{1}{8}$$
(set the numerator's x term with the highest degree over the denominator's x term with the highest degree)
Intercept= (0,0)
(set equation equal to zero and find x value; this is the x and the y intercept)
Therefore the correct answer is d. | {
"domain": "wikispaces.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754497285467,
"lm_q1q2_score": 0.8426500243059822,
"lm_q2_score": 0.855851143290548,
"openwebmath_perplexity": 1454.733835652903,
"openwebmath_score": 0.6757130026817322,
"tags": null,
"url": "http://pch-wiki.wikispaces.com/10.4+OFSA+Solutions?responseToken=004bbe007d7cd8b5a6b1266ce34c7f6c9"
} |
thermodynamics, entropy, phase-transition
Title: Phase Transition and changes in entropy In the case of a Van der Walls gas where I could say that $S = C_v \ln(T) + R\ln(V - b) + cte$,
noting it is stated on "Concepts in Thermal Physics" of Blundell:
Note that the entropy depends on the constant $b$, but not $a$. Entropy 'cares' about the volume occupied by the molecules in the gas(because this determines how much available space there is for the molecules to move around in, and this in turn determines the number of possible microstates of the system) but not about the intermolecular interactions. | {
"domain": "physics.stackexchange",
"id": 74363,
"lm_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, entropy, phase-transition",
"url": null
} |
rviz, urdf
Original comments
Comment by gvdhoorn on 2017-11-09:\
I have tried using the launch files from multiple sources but it did not work
if you don't tell us what you've already tried - and if it didn't work, what happened instead - we cannot help you.
We're here to help, but always include enough information.
Comment by bpinaya on 2017-11-09:
Try putting your display.launch here so we can give it a look.
Also, did you tried adding the robot model in the rviz window? You might be forgetting that.
It looks something like this:
Click the button that says Add and then select Robot Model.
Originally posted by bpinaya with karma: 700 on 2017-11-09
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 29322,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rviz, urdf",
"url": null
} |
spread-spectrum, gps, gnss
Hence, code phase is the result of range modulo (code sequence length)/$c_0$.
Carrier phase is just that – the phase of your carrier at the receiver. Look at the correlation peak above: it's a complex number, it not only got a magnitude, but also a phase.
Galileo publishes information on the phase centers of their satellite antennas – so, if your GNSS pseudorange estimation (based on the estimate of pseudoranges made up of full multiples of sequence lengths, and the code phase) is good enough, you can further increase it by observing the carrier phase as recovered from your correlation-based estimate. | {
"domain": "dsp.stackexchange",
"id": 11002,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "spread-spectrum, gps, gnss",
"url": null
} |
to computers. Linear Programming Example: Maximize C = x + y given the constraints, y ≥ 0 x ≥ 0 4x + 2y ≤ 8 Simple Linear Regression Examples. Wikipedia has more advanced examples represented as pure algebra and a discussion about algorithms that provide general solutions for this class of optimization problem. Dependent variables, on the left, are called basic variables. There are two principal algorithms for linear programming. Since we can only easily graph with two variables (x and y), this approach is not practical for problems where there are more than two variables involved. , are to be optimized. This speci c solution is called a dictionary solution. Typ-ically these applets allow the user to de ne a linear program with two variables with a total number of constraints up to 4 or 5. Today we’ll be learning how to solve Linear Programming problem using MS Excel? Linear programming (LP) is useful for resource optimization. Let’s start from one of the linear programming problems | {
"domain": "makariharlem.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513873424045,
"lm_q1q2_score": 0.8585407040574128,
"lm_q2_score": 0.8705972684083609,
"openwebmath_perplexity": 606.6295555419894,
"openwebmath_score": 0.5247300267219543,
"tags": null,
"url": "http://makariharlem.com/qt6hqml/linear-programming-2-variables-examples.html"
} |
general-relativity, space-expansion, time-dilation, dark-energy, cosmological-constant
Title: What is observed as rate of change of proper distance with time due to space-expansion to a binary star approaches, then exceeds the speed of light? Aliens on planet M observe a binary star at distance D with a 10 day "clockwise" revolution period. All other massive objects are FAR away and can be ignored.
At time=0, the center of mass of the binary star has zero velocity in planet M's reference frame.
Over a LONG period of time, due only to the expansion of space, the proper distance between M and the binary star increases such that the rate of change of proper distance with time (a) approaches c, (b) equals c, and (c) then exceeds c.
MANY generations of Aliens are observing this take place with unrealistically powerful telescopes and sensors of gravitation fields, what do they observe at time points (a), (b), and (c)? In terms of:
(1) Visible light
(2) Gravitation Fields
(3) Time dilation, i.e. revolution period | {
"domain": "physics.stackexchange",
"id": 78321,
"lm_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, space-expansion, time-dilation, dark-energy, cosmological-constant",
"url": null
} |
• I like this a lot, ’cause it’s exactly what I would have said (except that you’ve probably said it better than me). – Lubin Sep 4 '15 at 17:32
• Wow, that means a lot. Thanks! :) – Dorebell Sep 4 '15 at 19:04
• Wow, beautiful - thanks so much. Is there a way to kind of tell right off the bat that I should have used $\omega$ as a basis element instead of $i\sqrt{3}$? – Chris Sep 4 '15 at 21:18
• Well it's a root of unity, and any time your field extension involves roots of unity, it's a good idea to think in terms of them. Extensions generated by roots of unity (called cyclotomic extensions) are among the best-understood and simplest there are. Also, when you're discussing the splitting field of a polynomial, it's a good idea to pay attention to any symmetries the polynomial has. For a polynomial of the form $x^n-a$, any two roots differ by multiplication by a root of unity, and this is a wonderful symmetry to use. – Dorebell Sep 4 '15 at 21:27 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319879873276,
"lm_q1q2_score": 0.8190498192322087,
"lm_q2_score": 0.8267117940706735,
"openwebmath_perplexity": 92.97965961086115,
"openwebmath_score": 0.9551321864128113,
"tags": null,
"url": "https://math.stackexchange.com/questions/1421573/general-way-to-find-actions-of-automorphisms-of-the-group-of-x3-2-over-math/1421592"
} |
python, pandas, dataframe
Title: Pandas merge column duplicate and sum value How to merge duplicate column and sum their value?
What I have
A 30
A 40
B 50
What I need
A 70
B 50
DF for this example
d = {'address': ["A", "A", "B"], 'balances': [30, 40, 50]}
df = pd.DataFrame(data=d)
df In another case when you have a dataset with several duplicated columns and you wouldn't want to select them separately use:
df.groupby(by=df.columns, axis=1).sum() | {
"domain": "datascience.stackexchange",
"id": 7020,
"lm_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, pandas, dataframe",
"url": null
} |
thermodynamics, building-physics
Title: Does opening the oven door heat the house more than if the door is closed? In the winter I am in the habit of opening my oven door once I am done baking so that I can add the heat to the house. However I recently thought about it and it would seem that even if the door is closed, and the oven insulated, the only way for the oven to cool would be to heat the house. So this would mean that there is no benefit to opening the door in the winter and keeping it closed in the summer. | {
"domain": "physics.stackexchange",
"id": 2068,
"lm_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, building-physics",
"url": null
} |
The region of integration is a semicircle. It is the top half of a circle of radius $1$ centered at $(1,0)$. If I wanted to do this in polar coordinates, I would move the origin to the center of the circle by defining $u=x-1, du=dx$ Now I have $$\int_0^2\int_0^{\sqrt{2x-x^2}}xy\; dy\ dx=\int_0^2\int_0^{\sqrt{1-u^2}}(u+1)y\; dy \; du$$. Now the integral is over the top half of the unit circle centered at the origin, so $r$ goes from $0$ to $1$ and $\theta$ goes from $0$ to $\pi$
Without the shift, $\theta$ would range from $0$ to $\frac \pi 2$ and $r$ would range from $0$ to $2 \cos \theta$. You are correct that they divided by $r$ to get the upper limit, however $r$ is not zero at the upper limit (except at $\theta=\frac \pi 2$ where you should strictly make a limit argument). $r$ does go to zero in the region of integration, but not at the edge where the division was done. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9783846640860381,
"lm_q1q2_score": 0.8110210216620308,
"lm_q2_score": 0.8289388125473628,
"openwebmath_perplexity": 101.32626769117465,
"openwebmath_score": 0.9384313821792603,
"tags": null,
"url": "http://math.stackexchange.com/questions/366878/polar-coordinates-dividing-by-the-variable-r/366893"
} |
gears, pulleys, energy-storage
After reading a related post on this site about using pulleys to lift a weight, though, it has made me consider whether pulleys would be a better fit.
TL;DR - Would using pulleys, a gearbox, or a combination of the two be beneficial in decreasing the rope used when lifting/lowering a weight and increasing the RPM of the motor-generator? The most efficient power transmission is chain and sprockets. These work very well at a nominal cost.
Gears are probably next, but at a higher cost due to gear fabrication. The closed nature of a gear box should help longevity. Be sure you have gears that run both ways if you're planning on lifting with the gear set - some don't, like worm gears.
Belted pulleys would be next, just a little less efficient. This seems like it would be hard to manage, belts are generally continuous, though I guess they can be bought in length. Pulleys with ropes will be last due to rope friction, but are probably the cheapest option here. | {
"domain": "engineering.stackexchange",
"id": 4872,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gears, pulleys, energy-storage",
"url": null
} |
java, random, combinatorics, simulation
}
mSumOfDraws += mDrawsRequired;
// DEBUG System.out.println("Draws required in " + i
// + " st/nd/rd/th trial is " + mDrawsRequired);
}
System.out.println("Average value of draws required is "
+ (mSumOfDraws / EXPERIMENT_REPETITIONS));
} | {
"domain": "codereview.stackexchange",
"id": 12942,
"lm_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, random, combinatorics, simulation",
"url": null
} |
lambda-calculus, type-checking, type-inference
Hindley-Milner has a nice property in this respect: it's syntax-directed, i.e. it's presented as a set of deduction rules such that for any term, there is a single rule that can be used to end a deduction of this term. (Being syntax-directed is actually a property of a presentation of the type system, not a property of the type system. In this post, I use the classical syntax-directed presentation which builds generalization into the let rule, rather than having a separate rule for generalization.)
Another nice property (shared by almost every type system) is that unused variables can always be removed from the context. So for example, if $(\lambda x y.y (x y)) (\lambda z.z)$ is well-typed, it must have a type derivation ending with the App rule and, since the term has no free variable, an empty context:
$$
\dfrac{\vdash (\lambda x y.y (x y)) : \tau_1 \to \tau_0 \qquad
\vdash (\lambda z. z) : \tau_1}
{\vdash (\lambda x y.y (x y)) (\lambda z.z) : \tau_0}
$$ | {
"domain": "cs.stackexchange",
"id": 13555,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lambda-calculus, type-checking, type-inference",
"url": null
} |
Probably the most well known example is the alternating harmonic series: $$1 - \frac 1 2 + \frac 1 3 - \frac 1 4 + \frac 1 5 - \frac 1 6 + \cdots = \log_e 2,$$ but $$1 + \frac 1 3 + \frac 1 5 + \frac 1 7 + \cdots = \infty$$ and $$- \frac 1 2 - \frac 1 4 - \frac 16 - \cdots = -\infty.$$
-
What about $\sum_n \left((-1)^n + (-1)^{n-1}\right)$? – JavaMan Feb 23 '12 at 16:21
It's also the case that if $\sum a_n$ and $\sum b_n$ exist and are finite, then their sum is equal to $\sum (a_n+b_n)$, regardless of whether the first two converge absolutely or conditionally. – anon Feb 24 '12 at 18:00
If $N=M$ you can write $$\sum_{k=0}^Ma_k+\sum_{k=0}^N{b_k}=\sum_{k=0}^{N}(a_k+b_k)$$ If $M\gt{N}$: $$\sum_{k=0}^Ma_k+\sum_{k=0}^N{b_k}=\sum_{k=0}^{N}(a_k+b_k)+\sum_{k=N+1}^Ma_k$$
-
In the last line, your last sum should start at $N+1$. – M Turgeon Feb 23 '12 at 16:06
I would like to stress one additional thing which is not included in the above answers. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769078156284,
"lm_q1q2_score": 0.8043260146422786,
"lm_q2_score": 0.8244619242200082,
"openwebmath_perplexity": 262.1147792169997,
"openwebmath_score": 0.9520248174667358,
"tags": null,
"url": "http://math.stackexchange.com/questions/112413/whether-sum-a-sum-b-sum-ab-is-correct-or-not"
} |
machine-learning, feature-selection, model-selection
Looking at the columns, for each code, x3 and x4 features have similar values - when x3 is 2 or 5 or 8, the code would be 100 or 200 or 300 respectively, and when x4 is 4 or 10 or 16, the code would be 100 or 200 or 300 respectively.
Intuitively, leaving these columns as they are without dropping any would lead to redundant features while training a model. My question is how true is this my hypothesis? I'm not so confident about it. Does it really matter when training a model? Does it depend on the model type (tree based or otherwise)? 1) Those extracted features are "combination" of original features. Yes, it's additional information. And yes, it could be redundant, but I'd check that after creating those features by doing standard feature selection operations. Here's a great guide from Kaggle. At the same time, it might be a very good feature engineering decision - completely depends on a dataset. | {
"domain": "datascience.stackexchange",
"id": 6297,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, feature-selection, model-selection",
"url": null
} |
c, embedded
bool fifo_get_byte(struct fifo * fifo, uint8_t * output)
{
if (fifo_is_empty(fifo))
{
return 0;
}
else
{
if (fifo->data_ptr == NULL)
{
return 0;
}
const uint16_t MASK = fifo->size - 1;
*output = fifo->data_ptr[fifo->read_index];
fifo->read_index = (++fifo->read_index) & MASK;
fifo->elements--;
return 1;
}
}
The actual buffer is implemented at other source files like:
uint8_t rx_buffer[RX_BUFFER_SIZE];
struct fifo fifo = {
.data_ptr = rx_buffer,
.size = RX_BUFFER_SIZE,
}; Return the condition
When we test for equality, a == b is either 1 if they're equal or 0 if they're not (see C11 §6.5.8 Relational operators). Therefore we can simply return the expression instead of an if-else construct:
bool fifo_is_full(struct fifo * fifo)
{
return fifo->elements == fifo->size;
}
bool fifo_is_empty(struct fifo * fifo)
{
return fifo->elements == 0;
} | {
"domain": "codereview.stackexchange",
"id": 38813,
"lm_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, embedded",
"url": null
} |
soft-question, neutrinos, weak-interaction
Title: I need a kilogram of neutrinos. What are the challenges? So I am a benevolent genius that figured out that if only I had a kilo of neutrinos in a bottle, I could solve some long standing problems (climate change, rockets landing upright, world peace, the usual). What are the challenges?
So far, collecting neutrinos turned out to be... difficult. They only interact weakly (and gravitationally, I presume). The neutrinos we know of (coming from the Sun or supernovae or radioactive decay) are high energy and travel near the speed of light. My problems are
How can I slow them down? Nuclear reactors use moderation to "cool" down fast neutrons. Can we imagine a process to cool down neutrinos? What could we bounce them off of to transfer energy? Or maybe there are cold neutrinos everywhere we just haven't detected them? | {
"domain": "physics.stackexchange",
"id": 77267,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "soft-question, neutrinos, weak-interaction",
"url": null
} |
c, virtual-machine
Any code in the same block after goto or return is somewhat redundant without intervening goto-labels.
You know that an unsigned number cannot be smaller than zero? You explicitly made sure nop was zero (it would have been anyway) and vm->code[vm->ip] is a uint64_t.
if( vm->code[vm->ip] > halt || vm->code[vm->ip] < nop ) {
Any reason you hardcode that halt is the last instruction? Use sizeof to derive it from opcode2str. Or change the output-format slightly and use a default-case.
Why don't you output the position of an illegal instruction?
Your output on encountering an illegal instruction is fixed, even though you tried to output the offending instruction. Anyway, why don't you print the position too? %% results in output of a literal %.
printf("illegal instruction exception! instruction == \'%"
PRIu64 "\'\n", vm->code[vm->ip]); | {
"domain": "codereview.stackexchange",
"id": 26273,
"lm_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, virtual-machine",
"url": null
} |
lagrangian-formalism, gauge-theory, representation-theory, gauge-invariance
$\mathfrak{u}(1)$ is just generated by the $1 \times 1$ matrix known as "$1$", so here the only generator is $T^a$ where $a = 1$, and $T^1 = 1$. Then $\mathrm{Tr}(T^1) = 1, \mathrm{Tr}(T^1 T^1) = 1$, so the whole thing just reduces to $F \wedge \star F$ as it should. | {
"domain": "physics.stackexchange",
"id": 74240,
"lm_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, gauge-theory, representation-theory, gauge-invariance",
"url": null
} |
2. Relevant equations
3. The attempt at a solution
2. Apr 28, 2012
### Vorde
When I was studying for the SAT's and dealt with these equations the trick was to remember "n choose r", meaning that in the equations n is the number you are choosing from and r is the amount you are choosing.
In the first example you are choosing 3 out of 5 so n=5 r=3
Get it?
3. Apr 28, 2012
### Mathkid182
But then if we did the permutation formula for both questions then one wouldn't receive the same answer for both.
4. Apr 28, 2012
### HallsofIvy
If you write "L" for lose and "W" for win you can see that the problem, is the same as 'In how many ways can you write 2 "W"s and 3 "L"s?' | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109507462226,
"lm_q1q2_score": 0.8350879400057769,
"lm_q2_score": 0.847967764140929,
"openwebmath_perplexity": 813.8743822674653,
"openwebmath_score": 0.6295493245124817,
"tags": null,
"url": "https://www.physicsforums.com/threads/permutation-and-combination-problem.601007/"
} |
inorganic-chemistry, bond, halides, periodic-table
Small positive ion (Cation): The smaller the size of cation, the greater is its polarising power. Due to greater concentration of positive charge on a small area, the smaller cation has high polarising power. Thus, the greater will be the covalent nature of its bond with an anion. This explains why $\ce{LiCl}$ is more covalent than $\ce{KCl}$.
Large negative ion (Anion): The larger the size of anion, the greater is its polarizability, i.e. susceptibility to get polarized. It is due to the fact that the outer electrons of a large anion are loosely held and hence can be more easily pulled out by the cation. Thus the greater will be the covalent nature of the bond with a cation. This explains why iodides (e.g., $\ce{Kl}$), among halides (e.g., $\ce{KF}$ and $\ce{KCl}$), are most covalent in nature. | {
"domain": "chemistry.stackexchange",
"id": 14389,
"lm_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, bond, halides, periodic-table",
"url": null
} |
newtonian-mechanics, energy-conservation, conservation-laws, inertial-frames, collision
Throughout this answer, I've assumed that we are discussing inertial frames. However, neither car is in an inertial frame throughout the process, because there is some acceleration (both initially and during the collision). You can also analyze the scenario using the non-inertial reference frame of one of the cars. But, the analysis will be more complicated, because there will be changes to the total kinetic energy in the non-inertial frame during the times when the frame is accelerating. This is a "fictitious" change in energy, due to work done by the "fictitious" forces in the non-inertial frame. If you correctly account for these changes, you will get the same result as the analysis done in an inertial frame. As you can see, you can always get the same result as the analysis done in the privileged initial rest frame of the cars, but at the cost of increasingly elaborate forms of bookkeeping. | {
"domain": "physics.stackexchange",
"id": 86417,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, energy-conservation, conservation-laws, inertial-frames, collision",
"url": null
} |
automata-theory
Title: Regular language that discriminates between two deterministic CFGs Suppose you are given two deterministic push down automata which recognize languages $A$ and $B$, and wish to determine whether there is a regular language $R$ such that $A \subseteq R$ and $R \cap B = \emptyset$. Basically, the challenge is to determine whether there is a DFA that can recognize which of the two languages any given string comes from, given that it comes from one of those languages.
Is this decideable? If so, what is the complexity? Can the DFA be constructed explicitly? Eryk Kopczyński[1] showed in 2015 that separability (that's the name of your problem) of visibly pushdown languages by regular languages is undecidable. The class of visibly pushdown languages is a strict subset of deterministic CFL.
[1]: Eryk Kopczyński, Invisible Pushdown Languages, LICS'16, available at https://arxiv.org/abs/1511.00289 | {
"domain": "cstheory.stackexchange",
"id": 4192,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "automata-theory",
"url": null
} |
impose any restrictions on the choice of points $m_1$ and $m_2$. Repeatedly check until the value is found or the interval is empty. Also, the number of iterations doesn't depend on the values of $l$ and $r$, so the number of iterations corresponds to the required relative error. Although linear search algorithm is the most fundamental search algorithm and probably the first that most developers will learn, Binary … Now, we get one of three options: The desired maximum can not be located on the left side of $m_1$, i.e. on the interval $[l, m_1]$, since either both points $m_1$ and $m_2$ or just $m_1$ belong to the area where the function increases. However, this approach is not practical for large a or n. ab+c=ab⋅ac and a2b=ab⋅ab=(ab)2. If $m_1$ and $m_2$ are chosen to be closer to each other, the convergence rate will increase slightly. For a similar project, that translates the collection of articles into Portuguese, visit https://cp-algorithms-brasil.com. Following is a pictorial | {
"domain": "crystalholidaystravel.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214511730025,
"lm_q1q2_score": 0.8097734841065384,
"lm_q2_score": 0.8397339736884711,
"openwebmath_perplexity": 548.7301588325508,
"openwebmath_score": 0.30998891592025757,
"tags": null,
"url": "https://crystalholidaystravel.com/1761ab/878868-cp-algorithms-binary-search"
} |
Mathematics for M.... Itself is its own reflexive closure ; 3 ) but does not contain ( ;... Relation that contains it disjoint subsets ( P\ ) closure of a set into subsets! All the elements of a set a s of R if the transpose of.... Example, \ ( \le\ ) is its own reflexive closure relation on set with set, you add edges. For cs M. Hauskrecht closures Definition: Let R be an n -ary on... Relation that contains it symmetric if the transpose of relation matrix is equal its! Relations here 2 ; 3 ), but it may not be reflexive 171,282 views 12:59 the transitive of! Can find a path from to if you can find a path from to you. Of equivalence relations is that they partition all the elements of a relation is symmetric if the transpose relation. Symmetric if the transpose of relation symmetric closure of a relation binary relations on a set and an equivalence on. ): Discrete Mathematics for cs M. Hauskrecht closures Definition: Let be. Present composition of relations in soft set context and give | {
"domain": "terabook.info",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978712651931994,
"lm_q1q2_score": 0.8813598944620089,
"lm_q2_score": 0.9005297854505006,
"openwebmath_perplexity": 526.8847190002843,
"openwebmath_score": 0.7278335690498352,
"tags": null,
"url": "http://terabook.info/diy-rattan-kiluwab/symmetric-closure-of-a-relation-ada95c"
} |
java, multithreading, interview-questions
Main Class:
package ee.raintree.test.numbers;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
public class Main {
private final static String SPACE = " ";
private static int fileSize = 67108864;
private static String fileName;
public static void main(String args[]) throws InterruptedException, ExecutionException, IOException {
fileName = "result";
File result = new File(fileName);
int coreCount = Runtime.getRuntime().availableProcessors();
ExecutorService service = Executors.newFixedThreadPool(coreCount); | {
"domain": "codereview.stackexchange",
"id": 37001,
"lm_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, multithreading, interview-questions",
"url": null
} |
neural-network, siamese-networks
Already for $n=2$ you can see that you can have two classes where the hyperplane must not go through the origin. For example, let's say two images belong together, if $\hat{h}_{1} \leq c_{1}$ and $\hat{h}_{2} \leq c_{2}$. Now you can not separate those points from points with $\hat{h}_{1} > c_{1}$ or $\hat{h}_{2}> c_{2}$ using a hyperplane that contains the origin. Therefore, a bias is necessary.
Using the Dense layer in Tensorflow will use a bias by default, though, which is why the presented code is correct. | {
"domain": "datascience.stackexchange",
"id": 8389,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-network, siamese-networks",
"url": null
} |
complexity-theory, context-free, formal-grammars
There are several aspects to this algorithm. For better intuition I
chose to present it in three successive versions that introduce
progressively more features. The first version does not answer the
question, but is a standard algorithm for useless symbols elimination that suggests a solution. The second version answers the question without the minimality constraint, The third version gives an answer to the question, satisfying thye minimality constraint.
This third solution is then improved by using an adaptation to
and-or graphs of Dijkstra's shortest path algorithm.
The end result is a very simple algorithm, that avoids reconsidering computations already done. But it is less intuitive and does require a proof.
This answer only tries to answer the question as made precise by the OP's
comment: "for each production rule, I want to generate a minimal
string that takes the parser from the start state, through the
production being tested, to a set of terminals." Hence I only try to | {
"domain": "cs.stackexchange",
"id": 3078,
"lm_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, context-free, formal-grammars",
"url": null
} |
significant-figures
So in other words, for people who follow the NIST standard of stating uncertainty to two significant digits:
2.000 can mean anything from 1.990-2.010 to 1.901-2.099
Others only express uncertainty using one significant digit, in which case:
2.000 can mean anything from 1.999-2.001 to 1.991-2.009 | {
"domain": "chemistry.stackexchange",
"id": 8159,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "significant-figures",
"url": null
} |
If a real-valued function f is continuous on a proper closed interval [a, b], differentiable on the open interval (a, b), and f (a) = f (b), then there exists at least one c in the open interval (a, b) such that ′ =. Explain why there are at least two times during the flight when the speed of Rolle’s Theorem extends this idea to higher order derivatives: Generalized Rolle’s Theorem: Let f be continuous on >ab, @ and n times differentiable on 1 ab, . THE TAYLOR REMAINDER THEOREM JAMES KEESLING In this post we give a proof of the Taylor Remainder Theorem. 13) y = x2 − x − 12 x + 4; [ −3, 4] 14) y = View Rolles Theorem.pdf from MATH 123 at State University of Semarang. Stories. Michel Rolle was a french mathematician who was alive when Calculus was first invented by Newton and Leibnitz. <> Get help with your Rolle's theorem homework. Learn with content. Examples: Find the two x-intercepts of the function f and show that f’(x) = 0 at some point between the Taylor Remainder Theorem. This | {
"domain": "agusticosta.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357604052424,
"lm_q1q2_score": 0.8004346468122985,
"lm_q2_score": 0.8175744739711883,
"openwebmath_perplexity": 605.013444404452,
"openwebmath_score": 0.8216521739959717,
"tags": null,
"url": "http://agusticosta.com/coffee-mud-yeqkcc/rolle%27s-theorem-pdf-b09890"
} |
newtonian-mechanics, experimental-physics, acceleration, centripetal-force, data-analysis
The basic reason is that a particular reading could be due to a high-speed, large-radius turn or a low-speed, small-radius turn and the two cases call for different corrections.
If you have secondary data—such a ground velocity (speedometer speed is only approximately correct for this but you could make do) or angular velocity (from a compass or gryoscope)—then you can work something out.
Of course, for smooth driving behaviors you could also get enough secondary data from GPS, but in that case you don't actually need the accelerometer at all. | {
"domain": "physics.stackexchange",
"id": 57849,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, experimental-physics, acceleration, centripetal-force, data-analysis",
"url": null
} |
java, beginner
// Euclid's Algorithm. Takes two integers and returns the greatest common divisor.
private int euclidGCD(int a, int b) {
while (a != 0 && b != 0) {
int c = b;
b = a%b;
a = c;
}
return a+b;
}
private static final String EXIT_KEYWORD = "exit"; // Keyword to end the main program loop
public static void main(String[] args) {
int numInput, denInput;
Scanner kb = new Scanner(System.in); | {
"domain": "codereview.stackexchange",
"id": 7983,
"lm_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",
"url": null
} |
graphs, data-structures
Claim II: "Comparing any two words which are not adjacent will not yield any new information."
Let us continue to use the terms introduced in the proof of Claim I. Before we proceed to a proof, let us define what is existing information. The existing information is all requirements $R_{i,i+1}$ for $1\le i\le n-1$ or, what is equivalent, $O$, the minimum strict partial order which includes those requirements (and their implications), which is able to determine the order relationship of any pair of words in the array word. | {
"domain": "cs.stackexchange",
"id": 12355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs, data-structures",
"url": null
} |
gas-laws, temperature, pressure
I am under the (possibly incorrect) impression that both the realities of volume and attraction are supposed to be causing my incorrect prediction...but I don't understand how either does...
Thanks for any help! There is little reality to such an extrapolation. Attaching much significance will just lead you astray. There are a number of real gas equations which purport to correct for this or that "problem" with the ideal gas equation. The greater truth is that the equations just add extra fitting coefficients which make the equation more accurate. Different equations will work for different gases in different ranges. | {
"domain": "chemistry.stackexchange",
"id": 5011,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gas-laws, temperature, pressure",
"url": null
} |
python, rospy
And this is the error while launching the launch file using
roslaunch pure_pursuit pure_pursuit.launch
Traceback (most recent call last):
File "/home/krush/SDC/src/pure_pursuit/src/control_listpath.py", line 148, in <module>
pub = rospy.Publisher('path', Path, queue_size=10)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 842, in __init__
super(Publisher, self).__init__(name, data_class, Registration.PUB)
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 142, in __init__
raise ValueError("data_class [%s] is not a class"%data_class)
ValueError: data_class [<function Path at 0x7f636ecb6280>] is not a class
Edit:
#! /usr/bin/env python3
import math
import numpy as np
import rospy
from geometry_msgs.msg import PoseStamped
from nav_msgs.msg import Path
def Path():
# path = [(2.0, 0.0), (4.0, 0.0), (6.0, 0.0), (8.0, 0.0), (10.0, 0.0), (13.0, 0.0), (16.0, 1.5), (20.0, 2.5)]
global i
point_X, point_Y = path[i]
i += 1 | {
"domain": "robotics.stackexchange",
"id": 36182,
"lm_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, rospy",
"url": null
} |
fft, dft, audio-processing
The top is the original sound, and the bottom is after being convolved with the kernel I made. It's almost like the low frequency part of the kick drum has been reflected around the onset. When I use an equalizer plugin in ProTools, for example, and try to achieve this same filtering by hand, this weird extra sound does not occur, and the audio sounds like I expect. What would be causing this? Are typical multiband eqs like you might find ProTools/Reaper/etc using something other than this kind of custom DFT-base filter design to avoid this effect? The problem is that the impulse response starts well before its main peak. That means the output of the filter seems to start well before the onset (attack) of the original signal.
One way to mitigate this is to try to find the minimum phase equivalent of your impulse response. Another way to think about minimum phase is that this gives the minimum energy delay. | {
"domain": "dsp.stackexchange",
"id": 12039,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, dft, audio-processing",
"url": null
} |
kinematics, acceleration, velocity, definition, calculus
Title: Difference between Instantaneous Velocity and Acceleration? I'm studying the Speed and Velocity chapter. But there isn't anywhere mentioned in my book about clarity for the exact difference between Instantaneous speed and Acceleration. I'm curious to know about it.
Instantaneous Velocity: Instantaneous Velocity is Changing/Increasing at non-constant rate
Acceleration: Rate of change of velocity is called acceleration
Both terms seem confusing. anyone knows it to explain it in a better way? The velocity defined as $\vec{v}=\frac{d\vec{s}}{dt}$ is called instantaneous velocity. There is also average velocity which equals $\vec{v}=\frac{\Delta \vec{s}}{\Delta t}$, over some time $\Delta t$. In the case of uniform motion, average velocity over any time is the same as instantaneous velocity at any time.
Uniform motion happens when there is no acceleration on the body. | {
"domain": "physics.stackexchange",
"id": 82053,
"lm_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, acceleration, velocity, definition, calculus",
"url": null
} |
quantum-field-theory, hilbert-space, scattering, vacuum, s-matrix-theory
\begin{align}
|i\rangle&=|k_1k_2\rangle=(a_{k_1}^{-\infty})^\dagger (a_{k_2}^{-\infty})^\dagger|\Omega\rangle\tag*{(3)}\\
|f\rangle&=|p_1\cdots p_n\rangle=(a_{p_1}^{\infty})^\dagger\cdots (a_{p_n}^{\infty})^\dagger|\Omega\rangle,\tag*{(4)}
\end{align}
the inner product $\langle f|i\rangle$ of which is said to be the corresponding $S$-matrix element (Srednicki, Schwartz, et al.).
However, $\langle f|i\rangle$ is merely an inner product of products of single-particle states. How can this be right? Surely it's the Schrödinger picture states at asymptotic times that should be plane waves (or wave packets if you want to be more precise)? After all, what we want to know is the amplitude for an initial state of particles in the far past to evolve into some other state of particles in the far future (letting the limits be implicit):
\begin{align} | {
"domain": "physics.stackexchange",
"id": 96695,
"lm_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, hilbert-space, scattering, vacuum, s-matrix-theory",
"url": null
} |
homework-and-exercises, newtonian-mechanics, newtonian-gravity, orbital-motion
Attempt at a solution
I think i am almost there but this is what i have so far.
Using the eccentricity and R, I found the expression for the semi major axis of B as $R_{SB}$=$\frac{R}{1-\epsilon}$ and using the relation for time periods, i have the expression for $R_{SA}$=$[\frac{T_A}{T_B}]^{2/3}$$\frac{R}{1-\epsilon}$
Now my doubt is whether to assume that two planets have sun at the same focus(say, on the right side ...picture concentric ellipses) in which case the maximum distance is when one of them is closest to the sun and the other is farthest OR if the two planets have sun at different focii (one to the left and other to the right, in this the orbits overlap partly; in either of the case, i cannot find a perfect expression for the maximum distance! | {
"domain": "physics.stackexchange",
"id": 34156,
"lm_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, newtonian-gravity, orbital-motion",
"url": null
} |
ros-kinetic
That causes an rqt_reconfigure GUI to open and it will pre-select my_node for me.
Originally posted by Thomas D with karma: 4347 on 2019-02-15
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 32473,
"lm_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-kinetic",
"url": null
} |
c++, performance, matrix, complexity, vectors
Avoid using "using namespace std;"
Names spaces were invented to prevent collisions of class and function names from different libraries and modules. This code already introduces a struct/type that could conflict with the std names space (struct Vector). It would be better to get into the habit of prefixing objects from different namespaces with the namespace so that others can maintain the code if necessary. You might also want to make your Vector struct a class and create a namespace for it. A better discussion of this can be found on stackoverflow.com.
Using inline Function Declarations
Using inline in function declarations is generally obsolete. The inline declaration was created as an optimization in the early years of C++. Most modern C++ compilers will properly inline functions as necessary when compiling with -O3. There are times when inlining is not optimal due to cache restrictions and other reasons.
Debugging Code on Code Review | {
"domain": "codereview.stackexchange",
"id": 35213,
"lm_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, matrix, complexity, vectors",
"url": null
} |
python, python-3.x, calculator, tkinter
#insert astriks in their respective indices
if indices:
for i in range(len(indices)):
s = insert_in_string(s, indices[i]+i, "*")
return s
def replace_operators(s, symbol, operator):
"""Change symbol in provided string to its corresponding operator; returns modified string
s: string
symbol: symbol to change
operator: operator to replace with symbol"""
return s.replace(symbol, operator)
def calculate_result():
"""Print calculated result into entry widget"""
global parentheses, interchangeable_operators
result = str(result_lbl["text"])
if not result:
return
else:
result_lbl["text"] = ""
#modify string so it can be appropriately evaluated by the eval() function
for s in interchangeable_operators:
if s[0] in result:
result = replace_operators(result, s[0], s[1]) | {
"domain": "codereview.stackexchange",
"id": 40254,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, calculator, tkinter",
"url": null
} |
point, in physics, critical! Just differentiate it to determine where the derivative approaches zero ) the given function has critical! Procedure at … Forgot password besides that, the critical temperature, the conditions defining the critical.! 13, 14 find all critical points are points on a graph = 1x=1 and =. But opting out of 2 people found this document helpful your products leave your factory without any metal and... Differentiable over the entire set of real numbers far enough it is an inflection point is called a proper (., raw and cooked foods, and solving optimization problems be local extreme pointsand are hence points! X^4 - 4x^3 + 16xf ( x ) is a not a critical point is point! A second to talk about the intuition for critical points of the function is twice-differentiable, the is... A problem to see the solution derivative test f ’ equal to 0, unstable r... Must be absolutely pure and clean we just differentiate it to determine where the denominator of the point all in! | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226260757067,
"lm_q1q2_score": 0.8032973898186802,
"lm_q2_score": 0.8221891370573386,
"openwebmath_perplexity": 608.53946458966,
"openwebmath_score": 0.8116707801818848,
"tags": null,
"url": "http://43929101674.srv040130.webreus.net/cnef06/a762f1-types-of-critical-points"
} |
organic-chemistry, nmr-spectroscopy
If they are different molecules (e.g., geometric isomers, (E)-/(Z)- isomers, cis-/trans- isomers), then the original hydrogen atoms are heterotopic and should have different chemical shifts. Their environments are different.
If the molecules are diastereomers, then the two hydrogens are diastereotopic. Since we can distinguish diastereomers by achiral methods, so can NMR. That means that the two original hydrogen atoms will have different shifts.
If the molecules are enantiomers, then the two hydrogens are enantiotopic. They are different, but because NMR can't distinguish between enantiomers, it can't tell that these two hydrogen atoms are different. They will have the same shift.
If the two molecules are identical, then the two hydrogens are homotopic. Nothing can distinguish them. They are chemically equivalent, and by NMR, they will have the same chemical shift.
Try applying this test to the hydrogen atoms on the ethyl group and the hydrogen atoms on the ring. | {
"domain": "chemistry.stackexchange",
"id": 12664,
"lm_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, nmr-spectroscopy",
"url": null
} |
image-recognition
I would suggest to rescale your images to have the same pixel density as those you used for training (250x250) rather than scaling your model.
Methods for rescaling images and maintaining details are very well developed. Many exist and you can use existing tools such as Photoshop to change the pixel density of an image. | {
"domain": "ai.stackexchange",
"id": 281,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-recognition",
"url": null
} |
I'm thinking use this to proof that $\displaystyle\sum_{k=0}^{n-1}\alpha^{k}=0$ where $\alpha=\exp\left(\frac{2\pi}{n}\iota\right)$, thanks for any help.
## marked as duplicate by lab bhattacharjee trigonometry StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Apr 21 '16 at 2:05
• You probably mean $=0$ ? – Yves Daoust Apr 20 '16 at 22:29
• Just use the sum of geometric series, and that $\alpha^n=1$. – Berci Apr 20 '16 at 22:35
• Roots of unity maybe? – Aritra Das Apr 20 '16 at 22:36
Your sum is the real part of | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986777175525674,
"lm_q1q2_score": 0.8464259861042118,
"lm_q2_score": 0.8577681031721325,
"openwebmath_perplexity": 1244.495738726129,
"openwebmath_score": 0.7669275999069214,
"tags": null,
"url": "https://math.stackexchange.com/questions/1751936/how-to-prove-that-sum-k-0n-1-cos-left-frac2-pi-kn-phi-right-0"
} |
php, object-oriented, api
$records = $result->getRecords();
//Loop through the found records
foreach ( $records as $record ) {
//Loop through the fields given in the argument and set the fields with the values
foreach ( $arrFields as $f => $v ) {
$record->setField( $this->fm_escape_string( $f ), $this->fm_escape_string( $v ) );
}
//Commit the setFields
$commit = $record->commit();
if ( $this->isError( $commit ) !== 0 ) {
return $this->isError( $commit );
}
}
//Housekeeping
unset( $result, $commit, $record, $findReq );
return true;
} | {
"domain": "codereview.stackexchange",
"id": 1418,
"lm_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, api",
"url": null
} |
174 Chapter 3 Matrix Algebra and Applications quick Examples Matrix, Dimension, and Entries "The Matrix" conjures visions of Keanu Reeves as Neo on the silver screen, but matrices have a very real use in manipulating 3D graphics. This problem will generate a rotation matrix from an LOS, then rotate the POV and generate a new rotation matrix, then verify that the matrix is a rotation matrix. Introduction to Matrix Algebra Definitions: A matrix is a collection of numbers ordered by rows and columns. When s is set to 1. APPLICATIONS 5 Note that a matrix with real entries can also act on Cn, since for any x 2Cn also Mx 2Cn. Learn for free about math, art, computer programming, economics, physics, chemistry, biology, medicine, finance, history, and more. The distance to translate along the Y axis. Drashti Patel 150450116024 3). The Collaborative characteristic describes the degree to which technology is used to facilitate, enable, or enhance students’ opportunities to work with peers and | {
"domain": "kacpergomolski.pl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754506337405,
"lm_q1q2_score": 0.8183230388271673,
"lm_q2_score": 0.831143045767024,
"openwebmath_perplexity": 628.818077638687,
"openwebmath_score": 0.6772881150245667,
"tags": null,
"url": "http://kacpergomolski.pl/rvxm/matrix-transformation-applications.php"
} |
Now you can plot your data
ListPlot[Transpose[{freq, Abs[Fourier[Data1]]}], PlotRange -> All,
Joined -> True]
Your sample rate is small compared to the frequency so your data is concentrated near the origin. Expanding the plot shows that your peak is at the second point.
ListPlot[Transpose[{freq, Abs[Fourier[Data1]]}],
PlotRange -> {{0, 1}, All}, Joined -> True]
I suggest you write a Module if you whish to calculate the frequency axis automatically. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9481545333502202,
"lm_q1q2_score": 0.8335670036022761,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 985.5983238398626,
"openwebmath_score": 0.3349512219429016,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/69333/discrete-fourier-transform-with-x-axis-data"
} |
accelerometer, gyroscope, matlab, filter
Title: Complimentary filter issues I'm trying to implement the complimentary filter to get Euler angles using accelerometer and gyroscope data. Attached is the MATLAB code that I have along with a data set.
The data corresponds to moving the sensor from 0-90 degrees while attached to a goniometer. The sensor has an inbuilt algorithm that outputs Euler angles too and I'm trying to test the accuracy of this algorithm as it tends to overshoot the angle estimates.
The problem with the complimentary filter is that the angles move between (around) negative 40 and positive 40 degrees instead of changing between (around) 0-90 degrees.
Can anyone please point out what is wrong and why the complimentary filter isn't working well.
clc;
clear all;
close all;
M=importdata('Multiple_Sensors_747000.csv');
A=M.data;
[m n]=size(A);
a=1;
t=m/60;
angle=0; | {
"domain": "robotics.stackexchange",
"id": 1185,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "accelerometer, gyroscope, matlab, filter",
"url": null
} |
electromagnetism, energy, stress-energy-momentum-tensor
However, if you perform a non-linear operation (such as squaring the field, for example) the real and imaginary parts would mix, and so using the complex representation breaks down when we try to calculate the Poynting vector using the "usual" definition, or more generally, the Electromagnetic Stress-Energy Tensor. In these cases, you should in fact either be using the real part of the complex field you mentioned above, or a different definition for the quantities. | {
"domain": "physics.stackexchange",
"id": 68911,
"lm_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, energy, stress-energy-momentum-tensor",
"url": null
} |
homework-and-exercises, general-relativity, spacetime, reference-frames, observers
1) Gravitational time dilation from Allure's answer $t_0 = t_f \sqrt{1- \frac{2GM}{rc^2}}$
2) Time dilation caused by velocity $t_0=sqrt(1−v^2/c^2)$
With each I calculated the moon and earth solutions separately (getting always 0.999999 type numbers), then divided earth by moon to get the relative time dilation. Finally, I converted this into seconds per year.
The gravitational pull creates ~0.02096.... seconds per year. The velocity creates an additional 52.87... microseconds. So the final time dilation is around 21.0140431070800... milliseconds per year.
This is just the numbers I got and may not be correct. Hopefully it is useful to someone. Small technical point: given there's no objective way to measure time you can't actually calculate the difference between a "Moon second" and an "Earth second", unless you're comparing them to an observer at infinite distance. | {
"domain": "physics.stackexchange",
"id": 60663,
"lm_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, general-relativity, spacetime, reference-frames, observers",
"url": null
} |
java
static {
// Table 7. SGTIN-96 Partitions. page 28.
// Column order: (L), P, M, N Nd
sgtin96_company_prefix_len_partitions = new HashMap<Integer, int[]>();
sgtin96_company_prefix_len_partitions.put(12, new int[]{0, 40, 4, 1});
sgtin96_company_prefix_len_partitions.put(11, new int[]{1, 37, 7, 2});
sgtin96_company_prefix_len_partitions.put(10, new int[]{2, 34, 10, 3});
sgtin96_company_prefix_len_partitions.put(9, new int[]{3, 30, 14, 4});
sgtin96_company_prefix_len_partitions.put(8, new int[]{4, 27, 17, 5});
sgtin96_company_prefix_len_partitions.put(7, new int[]{5, 24, 20, 6});
sgtin96_company_prefix_len_partitions.put(6, new int[]{6, 20, 24, 7});
}
private static int[] getPartitionsByCompanyPrefixLengthInDigits(int company_prefix_length) {
// column 3 (L)
return sgtin96_company_prefix_len_partitions.get(company_prefix_length);
} | {
"domain": "codereview.stackexchange",
"id": 38361,
"lm_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
} |
information-theory, moving-average, probability
Remember, the information of the sequence $(X)_{i=1}^N$ of $N$ random variables $X_i, \, i=1, \ldots, N$ is:
\begin{align}
I(X=x) &= I((X_1=x_1, X_2=x_2, \ldots, X_N=x_N))\\
&\text{shorthand: }P(X_i=x_i)=:P(x_i)\\
&= I(x_1) + I((x_2, \ldots, x_N)|x_1)\\
&= I(x_1) + I(x_2|x_1)+I((x_3, \ldots, x_N)|x_1,x_2)\\
&= I(x_1) + \sum_{n=2}^N I(x_n|x_1,\ldots x_{n-1}) \tag 1\label{eq1}\\
&= -\log_2(P(x_1))- \underbrace{\sum_{n=2}^N\log_2(P(x_n|x_1,\ldots x_{n-1}))}_{:=v}\tag2\label{eq2}
\end{align}
You'll notice when considiering $v$ that all these $P(x_n|x_1,\ldots x_{n-1})$ collapse to $P(x_n)$ if, and only if, the $X_n$ are independent.
In that case, $I(X)$ simply becomes $\sum I(X_n)$. For all other cases, that sum is the upper bound for what the overall information can be, but doesn't necessarily achieve that.
Let's construct an example where all $X_N$ are Gaussian:
$X_1\sim \mathcal N(0;\sigma^2)$ is drawn from a Gaussian source. | {
"domain": "dsp.stackexchange",
"id": 8619,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "information-theory, moving-average, probability",
"url": null
} |
c++, c++11, reinventing-the-wheel, pointers
So prefer to use a system that works without change everywhere.
Manager
The class Manager is not used outside of class SharedPtr so personally I would make it a private member class of this SharedPtr.
Though you don't do any copying it is obvious that the Manager is non copyable. So it would be a good idea to make it explicitly non copyable to make sure you don't do so accidently.
Doing delete this; is very dangerous.
delete this;
I would rather change the interface so that the caller of disown() does the actuall delete of the manager object.
bool disown() {
return ((--counter) == 0);
}
~Manager() {
delete managed;
}
Single Argument Constructor
When you have single argument constructors you have to be very careful. The compiler will eagerly convert one type to another using a single argument constructor (and this can be an issue when you least expect it).
Examine this:
actionOne(SharedPtr<int> const& val){/*Do Stuff*/} | {
"domain": "codereview.stackexchange",
"id": 23008,
"lm_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, reinventing-the-wheel, pointers",
"url": null
} |
c#, object-oriented, interview-questions, chess
public class Bishop : ChessPiece
{
public Bishop(Position poisition)
: base(poisition, PieceType.Bishop)
{
}
public override bool IsValidMove(Position dest)
{
if (!IsOnBoard(this.Position, dest))
{
return false;
}
if (Position.Height == dest.Height) //same row
{
return true;
}
if (Position.Width == dest.Width) //same column
{
return true;
}
return false;
}
}
public class Rook : ChessPiece
{
public Rook(Position poisition)
: base(poisition, PieceType.Rook)
{
} | {
"domain": "codereview.stackexchange",
"id": 27659,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, object-oriented, interview-questions, chess",
"url": null
} |
performance, beginner, haskell
hashSHA1Encoded :: ByteString -> ByteString
hashSHA1Encoded bs =
let hashDigest = hash bs :: Digest SHA1
byteString = B.pack . BA.unpack $ hashDigest
in byteString
-- Pass a counter and if the first 20 bits are zero then return the same counter value else increment it
-- signifying it is time to test the next number (NOTE: recursive style, may overflow stack)
testCounter :: ByteString -> Int32 -> Int32
testCounter rb !counter =
let baseString = getBaseString rb counter
hashedString = hashSHA1Encoded $ convertFromString baseString
!eitherFirst32 = runGet mahDecoder hashedString
incCounter = counter + 1
in case eitherFirst32 of
(Left first32, _) -> testCounter rb incCounter
(Right first32, _) -> if (firstBitsZero first32)
then counter
else testCounter rb incCounter | {
"domain": "codereview.stackexchange",
"id": 23850,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, beginner, haskell",
"url": null
} |
python, beginner, python-3.x, game, tkinter
letters_3_button = Button(
current_frame,
text="Letters 3",
font=("Helvetica", 25),
command=letters_3
)
letters_3_button.grid(column=0, columnspan=1, row=3, sticky=(tkinter.W, tkinter.E))
letters_4_button = Button(
current_frame,
text="Letters 4",
font=("Helvetica", 25),
command=letters_4
)
letters_4_button.grid(column=0, columnspan=1, row=4, sticky=(tkinter.W, tkinter.E))
listening_test_button = Button(
current_frame,
text="Listening Test",
font=("Helvetica", 25),
command=Letters_Listening_Test.letters_listening_test
)
listening_test_button.grid(column=0, columnspan=1, row=5, sticky=(tkinter.W, tkinter.E)) | {
"domain": "codereview.stackexchange",
"id": 35522,
"lm_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, game, tkinter",
"url": null
} |
general-relativity, differential-geometry
I would like to know: 1) If I am correct that lines 1 and 4 are true and 2) is my explanation sufficient, or is there a more elegant way to understand why this is. For the Minkowski space, $\displaystyle \int_{spacetime} d^4x \partial_\nu f^\nu =0$ assuming the $f^\nu$ vanishes at infinity sufficiently rapidly. Because it would be the surface integration of $f^\nu$ over the surface which is boundary to the whole of spacetime (by Gauss's theorem).
Similarly, in a general spacetime, $\displaystyle \int_{spacetime} d^4x \sqrt{-g}\nabla_\nu f^\nu =0$.
If you take the Minkowskian space then $\sqrt{-g} = 1$, $\nabla_\nu=\partial_\nu$ and thus, for Minkowski space, you can also write (if you really want to I mean) $\displaystyle \int_{spacetime} d^4x \nabla_\nu f^\nu =0 = \displaystyle \int_{spacetime} d^4x \sqrt{-g} \partial_\nu f^\nu$. | {
"domain": "physics.stackexchange",
"id": 41102,
"lm_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",
"url": null
} |
(ii) List the first six elements of P for n = 0, 1, 2, 3, 4, 5.
(iii) Show that not all elements of P are prime.
[6]
d.
## Markscheme
(i) METHOD 1
using a relevant list of powers of 13: (1), 13, 169, (2197) M1
$$871 = 5 \times {13^2} + 2 \times 13$$ A1
$$871 = {520_{13}}$$ A1
$$1157 = 6 \times {13^2} + 11 \times 13$$ A1
$$1157 = 6{\text{B}}{{\text{0}}_{13}}$$ A1
METHOD 2
attempted repeated division by 13 M1
$$871 \div 13 = 67;{\text{ }}67 \div 13 = 5{\text{rem}}2$$ A1
$$871 = {520_{13}}$$ A1
$$1157 \div 13 = 89;{\text{ }}89 \div 13 = 6{\text{rem11}}$$ A1
$$1157 = 6{\text{B}}{{\text{0}}_{13}}$$ A1
Note: Allow (11) for B only if brackets or equivalent are present.
(ii) $$871 = 13 \times 67;{\text{ }}1157 = 13 \times 89$$ (M1)
67 and 89 are primes (base 10) or they are co-prime A1
So $$\gcd (871,{\text{ }}1157) = 13$$ AG
Note: Must be done by hence not Euclid’s algorithm on 871 and 1157. | {
"domain": "iitianacademy.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419674366167,
"lm_q1q2_score": 0.8037973178354316,
"lm_q2_score": 0.8128673178375734,
"openwebmath_perplexity": 2846.0933988708794,
"openwebmath_score": 0.8445948958396912,
"tags": null,
"url": "https://www.iitianacademy.com/ib-dp-maths-topic-10-5-representation-of-integers-in-different-bases-hl-paper-3/"
} |
electrons, electric-fields, charge, protons
Now if in fact there is a field emitted, do we know what this field actually is...? waves? other particles?
& again, iff a field, then surely an orbiting electron which can't be superimposed on the proton creates a moving imbalance of field as it orbits at a distance? something we don't hear about in the classroom. It's tempting to think of an electrical field as something physical - maybe like a tension in a rubber sheet as is so often used as a metaphor for gravity. But this can be dangerously misleading.
We can identify any point in spacetime by its coordinates $(t, x, y, z)$ and at any point in spacetime the electric vector can have some value $\mathbf E$. We use the notation $\mathbf E(t, x, y, z)$ to mean the value of the electric vector at every position in space and every time, and this object is what we call the electric field. | {
"domain": "physics.stackexchange",
"id": 36399,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrons, electric-fields, charge, protons",
"url": null
} |
events are situations where. Note: Some books will say to take care that A and B are independent, but the rule can also be used with dependent events, you just have to be more careful in find P(A) and P(B). Note: don't find symbol of intersection,so write instead. Given two independent events A and B such that P(A) = 0. Example 1 The two-way frequency table gives data about 180 randomly selected flights that arrive at an airport. Just multiply the probability of the first event by the second. Variables are defined as the properties or kinds of characteristics of certain events or objects. Let A and B be two events such that P(A) =0. Thus the two coins are independent. Discover why we are the world's leading cloud software company powering social good. Find the probability of occurrence of two events. gl/9WZjCW If A, B are two independent events, show that bar A and bar B are also independent. Events can be " Independent ", meaning each event is not affected by any other events. The | {
"domain": "chiavellainox.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969679646668,
"lm_q1q2_score": 0.8340585122931772,
"lm_q2_score": 0.8479677545357568,
"openwebmath_perplexity": 380.949029133403,
"openwebmath_score": 0.6175912022590637,
"tags": null,
"url": "http://chiavellainox.it/dtiz/a-and-b-are-two-independent-events.html"
} |
newtonian-mechanics, centripetal-force, angular-velocity
The position vector stays the same length and rotates around and around in a circle. Because the position vector is changing, it has a derivative. That derivative is the velocity.
Because we're always going the same speed, the velocity vector also stays the same length. Because the velocity is always 90 degrees rotated from the position, the velocity is also going around in a circle. In other words, the velocity vector is doing exactly the same thing as the position vector is doing; rotating and staying constant length. The only difference between the position and velocity is that we rotated by 90 degrees and multiplied the length by $v/r$. | {
"domain": "physics.stackexchange",
"id": 22899,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, centripetal-force, angular-velocity",
"url": null
} |
ros, transform, tf2
Comment by tfoote on 2021-09-20:
Oh, you're trying to add a frame to the transform tree not evaluate or apply a transform. I'm editing my answer above.
Comment by anguyen9630 on 2021-09-21:
Hmmm, I've heard about publishing as a reverse with /base_link as source and /odom as child but I've probably implemented it wrong because I get this error....
[rviz2-15] [INFO] [1632209690.552025004] [rviz2]: Message Filter dropping message: frame 'base_link' at time 0.000 for reason 'Unknown'
I'll definitely read on the robot_pose_ekf though. Sad that it is for the older ROS.
Comment by tfoote on 2021-09-21:
If you're looking for odometry in ROS 2 there's good documentation in the navigation 2 project: https://navigation.ros.org/setup_guides/odom/setup_odom.html
Comment by anguyen9630 on 2021-09-22:
Thanks, this link is really helpful! | {
"domain": "robotics.stackexchange",
"id": 36928,
"lm_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, transform, tf2",
"url": null
} |
quantum-mechanics, measurement-problem, observables, wavefunction-collapse
I know these questions have been pretty naive, but I'm intentionally trying to investigate things from an extraordinarily minimalist perspective... | {
"domain": "physics.stackexchange",
"id": 5297,
"lm_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, measurement-problem, observables, wavefunction-collapse",
"url": null
} |
c++, design-patterns, abstract-factory
// Declare the constructor we use:
HouseParts() = default;
HouseParts( const WindowT& w, const DoorT& d )
: m_window(w), m_door(d)
{}
HouseParts( WindowT&& w, DoorT&& d )
: m_window(std::move(w)), m_door(std::move(d))
{}
AbstractWindow& window() override
{
return m_window;
}
AbstractDoor& door() override
{
return m_door;
}
const AbstractWindow& window() const override
{
return m_window;
}
const AbstractDoor& door() const override
{
return m_door;
}
private:
WindowT m_window;
DoorT m_door;
}; | {
"domain": "codereview.stackexchange",
"id": 42759,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, design-patterns, abstract-factory",
"url": null
} |
swift, sprite-kit
var currentScore = (scoreLabel.text).toInt()
var newScore = currentScore! + 1
scoreLabel.text = String(newScore)
}
}
}
}
This sometimes gets laggy when I test it on an iPhone (I tested separately on iPhone 5 and 6) and I have no idea why. I have checked for infinite loops and stuff like that. You've posted quite a lot of code, and as such, for now I'm going to focus simply on a big picture overview of your code (and its organization).
This is the first thing that stands out to me is that you've got property declarations interspersed through all of your method declarations. Move all of the properties to the top.
There's a lot of code in didMoveToView(), and some of it is duplicated: | {
"domain": "codereview.stackexchange",
"id": 14814,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "swift, sprite-kit",
"url": null
} |
ros, usb, roslaunch, openni.launch, openni-launch
Originally posted by acp on ROS Answers with karma: 556 on 2014-01-22
Post score: 1
I found two possible solutions:
sudo modprobe -r gspca_kinect as suggested here
or deactivating xHCI and EHCI Hand-off in the bios as suggested here
there is also some firmware update from Asus related to USB 3.0 problems
Originally posted by ZdenekM with karma: 704 on 2014-01-22
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by acp on 2014-01-22:
Thank you Zdenek, I solved the problem by disabling the USB3 in the Bios and enabling USB2. I will later on try the firmware from Asus. | {
"domain": "robotics.stackexchange",
"id": 16722,
"lm_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, usb, roslaunch, openni.launch, openni-launch",
"url": null
} |
complexity-theory, proof-techniques, p-vs-np
, which is simply false. I will demonstrate why it isn't necessary to plug in all possible values and sketch how to arrive at an $O^*((2^k-1)^{n/k})$ time algorithm, where $k$ is the number of clauses. $O^*$ 'hides' poly-logarithmic factors, so for fixed $k$, this would be an $o(2^n)$ algorithm.
A key idea is this: If we wish to satisfy some clause of $m$ literals $l_1 \vee l_2 \vee \dots\vee l_m$ by assigning truth-values, then there are $2^m-1$ ways to do this, as exactly one of the assignments does not satisfy the formula. This means we in fact do not have to test every assignment (for this clause). | {
"domain": "cs.stackexchange",
"id": 10484,
"lm_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, proof-techniques, p-vs-np",
"url": null
} |
similariy distance: is different from Why does Steven Pinker say that “can’t” + “any” is just as much of a double-negative as “can’t” + “no” is in “I can’t get no/any satisfaction”? Does anybody know reason for different definitions? The name derives from the term "direction cosine": in this case, unit vectors are maximally "similar" if they're parallel and maximally "dissimilar" if they're orthogonal (perpendicular). Cosine similarity vs Euclidean distance. Why does the U.S. have much higher litigation cost than other countries? The intuition behind this is that if 2 vectors are perfectly the same then similarity is 1 (angle=0) and thus, distance is 0 (1-1=0). Similarly you can define the cosine distance for the resulting similarity value range. Arne Arne. Y1LABEL Angular Cosine Similarity TITLE Angular Cosine Similarity (Sepal Length and Sepal Width) ANGULAR COSINE SIMILARITY PLOT Y1 Y2 X . How do the material components of Heat Metal work? Mathematically, it measures the cosine of | {
"domain": "phoenixmillwork.ca",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9504109742068042,
"lm_q1q2_score": 0.8020471740099232,
"lm_q2_score": 0.8438951104066293,
"openwebmath_perplexity": 1491.0990115017482,
"openwebmath_score": 0.6583377122879028,
"tags": null,
"url": "http://phoenixmillwork.ca/xi0ehbyc/cosine-similarity-vs-cosine-distance-d0b788"
} |
c, validation, finance
int main(void)
{
double cardnumber;
printf("Give me a number: \n");
scanf("%lf", &cardnumber);
if(cardnumber < 1000000000000 || cardnumber > 10000000000000000)
{
printf("INVALID\n");
return 0;
}
if(cardnumber < 100000000000000 && cardnumber > 9999999999999)
{
printf("INVALID\n");
return 0;
} | {
"domain": "codereview.stackexchange",
"id": 6818,
"lm_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, validation, finance",
"url": null
} |
There is another useful rule, which I don't seem to have seen written down explicitly:
Let $f, g, r$ and $s$ be functions such that $g\to\infty$ and $r, s$ are bounded.
Then the limit of $\dfrac{f}{g}$ and the limit of $\dfrac{f + r}{g + s}$ gives the same result.
Applied here, since $\sin x$ is bounded, the limit is the same as the limit of $\dfrac{x}{x}$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.962673109443157,
"lm_q1q2_score": 0.8143660327947337,
"lm_q2_score": 0.8459424334245618,
"openwebmath_perplexity": 379.0403536698987,
"openwebmath_score": 0.9183768630027771,
"tags": null,
"url": "https://math.stackexchange.com/questions/1710786/why-does-lhopitals-rule-fail-in-this-case"
} |
nuclear-physics, baryons
is probably around $N=5$ ($N$ is actually not strictly a good quantum number). So for a neutron in lead, the difference between the lowest shell and the Fermi level is about 5 times this, or about 35 MeV. This is a lot less than 177 MeV. Of course the lambda has a different mass and different interactions than a neutron or proton, but I don't think that's enough to make the qualitative outcome different. | {
"domain": "physics.stackexchange",
"id": 62021,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, baryons",
"url": null
} |
electrical-engineering, optics
How can I measure the brightness of a LED? Customer specified "acceptable brightness" is going to be a subjective affair unless you have something to calibrate their responses against.
Loosely, you'll need to measure the available light within a particular area and then correlate that measurement with customer surveys. With a large enough sample of responses, you should be able to determine what constitutes an acceptable level of lighting for your customers.
I would expect that customer responses will fall along a curve of some sort and you'll eventually be able to determine what the standard deviations are for "acceptable." | {
"domain": "engineering.stackexchange",
"id": 37,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrical-engineering, optics",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.