text stringlengths 1 1.11k | source dict |
|---|---|
deep-learning, nlp, word2vec, lstm, word-embeddings
0.21449 0.37638 0.11239 -0.53639 -0.025092 0.31886
-0.25013 -0.63283 -0.011843 1.377 0.86013 0.20476
-0.36815 -0.68874 0.53512 -0.46556 0.27389 0.4118
-0.854 -0.046288 0.11304 -0.27326 0.15636 -0.20334
0.53586 0.59784 0.60469 0.13735 0.42232 -0.61279
-0.38486 0.35842 -0.48464 0.30728 ] | {
"domain": "datascience.stackexchange",
"id": 2893,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-learning, nlp, word2vec, lstm, word-embeddings",
"url": null
} |
MathRevolution: Finish GMAT Quant Section with 10 minutes to spare
The one-and-only World’s First Variable Approach for DS and IVY Approach for PS with ease, speed and accuracy. | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8152324983301568,
"lm_q2_score": 0.8152324983301568,
"openwebmath_perplexity": 8641.472859619016,
"openwebmath_score": 0.7813389897346497,
"tags": null,
"url": "https://gmatclub.com/forum/which-of-the-following-is-satisfied-with-x-4-x-212417.html"
} |
ros, buildfarm, bloom-release
Originally posted by William with karma: 17335 on 2017-05-25
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 27992,
"lm_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, buildfarm, bloom-release",
"url": null
} |
java, math-expression-eval
I think it is still simple and comprehensible. And now you just have to implements Word for all cases and you quickly distinct the constants and the functions.
Const is simple as pushing his value to the stack.
Function pop his parameters from the stack and push the result (which will be a Const.
In a simple arithmetic context, you have one Const which is a Number and set of BinaryFunction : Addition, Multiplication, Division ...
At this stage you can test individually all functions and also test that your interpreter is able to reduce a sequence of Words.
PostfixInterpreter target = new PostfixInterpreter();
assertThat(target.evaluate(new Number(1), new Number(2), new Addition())
.isEqualTo(new Number(1 + 2));
// And more complex calculations | {
"domain": "codereview.stackexchange",
"id": 21526,
"lm_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, math-expression-eval",
"url": null
} |
ruby, circular-list
Title: Circular Buffer implementation in Ruby Does the implementation look correct? Did I miss something major/minor?
class CircularBuffer
class BufferEmptyException < StandardError; end;
class BufferFullException < StandardError; end;
def initialize(size)
@size = size
@buffer = []
end
def write(data)
raise CircularBuffer::BufferFullException if @buffer.size >= @size
@buffer << data if data
end
def write!(data)
if data
@buffer << data
@buffer.shift
end
end
def clear
@buffer = []
end
def read
data = @buffer.shift
raise CircularBuffer::BufferEmptyException unless data
data
end | {
"domain": "codereview.stackexchange",
"id": 10017,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby, circular-list",
"url": null
} |
java, beginner
In a more elaborate program, this data structure might even be defined using xml, a yaml file, or maybe even be stored in a database.
Suggested solution
Define supporting classes to represent the questions, answers, and results. I also suggest defining helper functions q(), a(), and result(), respectively, to avoid writing the new keyword everywhere when defining the tree.
Then, you can write a menu() loop that navigates that tree structure based on the user input.
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;
public class ReactionMechanism {
//////////////////////////////////////////////////////////////////////
private interface MenuItem {
} | {
"domain": "codereview.stackexchange",
"id": 19672,
"lm_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
} |
It is currently 19 Apr 2018, 14:08
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# Events & Promotions
###### Events & Promotions in June
Open Detailed Calendar
# Points A, B, C, and D lie on the number line as shown in th
Author Message
TAGS:
### Hide Tags
Math Revolution GMAT Instructor
Joined: 16 Aug 2015
Posts: 5245
GMAT 1: 800 Q59 V59
GPA: 3.82
Points A, B, C, and D lie on the number line as shown in th [#permalink]
### Show Tags
Updated on: 14 Dec 2017, 02:10
Expert's post
2
This post was
BOOKMARKED
00:00
Difficulty:
95% (hard) | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9241418241572634,
"lm_q1q2_score": 0.8012639975602248,
"lm_q2_score": 0.8670357477770336,
"openwebmath_perplexity": 5213.152681169498,
"openwebmath_score": 0.6978742480278015,
"tags": null,
"url": "https://gmatclub.com/forum/points-a-b-c-and-d-lie-on-the-number-line-as-shown-in-th-255286.html"
} |
c++, event-handling, entity-component-system
You can accomplish that by updating EventManager to:
struct EventManager
{
template <class EventType>
using call_type = std::function<void(const EventType&)>;
template <typename EventType>
void subscribe(call_type<EventType> callable)
{
// When events such as COLLISION don't derive
// from Event, you have to get the type by
// using one more level of indirection.
size_t type = Event<EventType>::type();
if (type >= m_subscribers.size())
m_subscribers.resize(type+1);
m_subscribers[type].push_back(CallbackWrapper<EventType>(callable));
}
template <typename EventType>
void emit(const EventType& event)
{
// Same change to get the type.
size_t type = Event<EventType>::type();
if (type >= m_subscribers.size())
m_subscribers.resize(type+1); | {
"domain": "codereview.stackexchange",
"id": 11935,
"lm_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++, event-handling, entity-component-system",
"url": null
} |
.net, pointers, c++-cli
struct safe_bool { private: safe_bool(); };
/** \brief C++/CLI analogue to boost::scoped_ptr, also similar to std::unique_ptr, for management of the lifetime of an unmanaged class instance by a managed object
**/
template<typename T>
public ref class clr_scoped_ptr
{
T* m_native_ptr;
// declare copy-constructors and assignment operators to prevent double-free
clr_scoped_ptr( clr_scoped_ptr<T>% ) /* = delete */ { throw gcnew System::InvalidOperationException("clr_scoped_ptr is non-copyable"); }
template<typename U>
clr_scoped_ptr( clr_scoped_ptr<U>% ) { throw gcnew System::InvalidOperationException("clr_scoped_ptr is non-copyable"); }
clr_scoped_ptr% operator=( clr_scoped_ptr<T>% ) /* = delete */ { throw gcnew System::InvalidOperationException("clr_scoped_ptr is non-copyable"); }
template<typename U>
clr_scoped_ptr% operator=( clr_scoped_ptr<U>% ) { throw gcnew System::InvalidOperationException("clr_scoped_ptr is non-copyable"); } | {
"domain": "codereview.stackexchange",
"id": 8382,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": ".net, pointers, c++-cli",
"url": null
} |
photons, quantum-information, interference, space, thought-experiment
Title: All the information (photons) within a unit cube of space So here is a thought, lets fix a cube of side 1cm, it contains light passing through it from all possible angles, be it stars or insect.
If we change our angle of view we can see different objects due to the infinite information passing through it in forms of photons. (By using microscope we can even extract more information from that cube)
Wouldn't that imply that a small unit cube has infinite information passing through it and which is not altering other information ? Photons have momentum and energy so by GR there can only be so many photons above a certain energy in a volume before it collapses into a black hole. | {
"domain": "physics.stackexchange",
"id": 71788,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "photons, quantum-information, interference, space, thought-experiment",
"url": null
} |
fft, discrete-signals, fourier-transform, dft, fourier
Title: perform fourier-type integration using DFT misunderstanding I need to perform the following integral ($i^2 = -1$) (with a fixed value of $m$):
$
\int_{\phi=0}^{\phi=2\pi} \psi(\phi) e^{-im \phi} \hspace{0.7mm} d\phi
$
for all values of $m$ in $\{-N_{\theta}, -N_{\theta}+1, ..., 0, 1, ..., N_{\theta}-1, N_{\theta} \}$, that would be $2N_{\theta} + 1$ naive calculations of the above integral (plug $m$ into the formula and use Riemann sums, for example), each time with a different value of $m$. $N_{\theta}$ is an integer $> 0$.
I recognize the above as a Fourier Transform from $\phi$ to $m$.
How could I use the DFT (i.e. scipy's FFT implementation) to help me perform the integral above?
[ I have the function $\psi$ evaluated at equidistant points $\phi_j$ for $j \in \{0, 1, ..., 2N_{\theta} \}$ in memory. ]
My problem is that reading the scipy's documentation, it outputs a result of the form:
$
I(m_x) = \sum_{j=0}^{j=M-1} \psi(\phi_j) \hspace{0.8mm} e^{-i \frac{2\pi x}{M} j} | {
"domain": "dsp.stackexchange",
"id": 11361,
"lm_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, discrete-signals, fourier-transform, dft, fourier",
"url": null
} |
javascript, html, dom
.show__name{
display: flex;
font-size: 2rem;
flex-direction: column;
}
.show__name p {
margin: 1.2rem;
font-size: 3rem;
text-align: center;
}
.test{
font-size: 40rem;
color: black;
}
.img-style{
transition: all 2s;
width: 400px;
}
.img-style:hover{
transform: scale(1.1);
margin-top: 1.5rem;}
.yes {
display: flex;
flex-direction: column;
align-items: center;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TV APP</title>
<link rel="stylesheet" href="style.css">
</head>
<body> | {
"domain": "codereview.stackexchange",
"id": 43940,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, html, dom",
"url": null
} |
c++, unit-testing, template, boost, overloading
#include "image_operations.h"
#ifdef USE_BOOST_SERIALIZATION
#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/array.hpp>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/export.hpp>
#include <boost/serialization/list.hpp>
#include <boost/serialization/nvp.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/split_free.hpp>
#include <boost/serialization/unique_ptr.hpp>
#include <boost/serialization/vector.hpp>
#endif
namespace TinyDIP
{
template <typename ElementT>
class Image
{
public:
Image() = default;
Image(const std::size_t width, const std::size_t height):
width(width),
height(height),
image_data(width * height) { } | {
"domain": "codereview.stackexchange",
"id": 41999,
"lm_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++, unit-testing, template, boost, overloading",
"url": null
} |
$$F(x) = \sqrt{p(x) + \sqrt{p(x+1) + \sqrt{p(x+2) + \cdots }}}$$
Then $$F$$ solves
$$F(x)^2 = p(x) + F(x+1).$$
Now we make an ansatz that $$F(x)$$ takes the form $$F(x) = ax + b$$. Plugging this and comparing coefficients shows that
$$F(x) = x + 2$$
solves the functional equation. Finally, since $$(p(1), p(2), p(3), \cdots) = (5, 11, 19, \cdots)$$, the infinite radical in question corresponds to the case $$x = 1$$, giving
$$\sqrt{5 + \sqrt{11 + \sqrt{19 + \cdots}}} = F(1) = 3.$$
Rigorous justification. Let $$\mathcal{C}$$ be the set of all continuous functions $$f : [0, \infty) \to \mathbb{R}$$ such that
$$\| f\| := \sup_{x\to\infty} \left( 2^{-x/2} |f(x)| \right)$$
is finite. Notice that $$\mathcal{C}$$ is a complete normed space with respect to $$\|\cdot\|$$. Write $$p(x) = x^2 + 3x + 1$$ and define
$$\mathcal{A} = \{ f \in \mathcal{C} : f(x) \geq 0 \text{ for all } x \geq 0 \}.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232889752295,
"lm_q1q2_score": 0.8080666254192675,
"lm_q2_score": 0.8221891305219504,
"openwebmath_perplexity": 294.9393067661037,
"openwebmath_score": 1.000002145767212,
"tags": null,
"url": "https://math.stackexchange.com/questions/3080127/find-the-sum-sqrt5-sqrt11-sqrt19-sqrt29-sqrt41-cdots/3080205"
} |
organic-chemistry, organic-oxidation, rearrangements
In the case of peroxyhemiketal 8, acyl migration leads to cation 9 which is more stable than species 11, which has a positive charge adjacent to a carbonyl group, which is destabilizing. Thus, anhydride 10 is formed in preference to α-ketoester 12. | {
"domain": "chemistry.stackexchange",
"id": 11544,
"lm_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, organic-oxidation, rearrangements",
"url": null
} |
atmosphere, rocks, gas
Instead of the water use in human-engineered process of fracking breaking the underlying rocks up to release the methane for commercial purposes. The considerably larger impact of an asteroid does the same thing in a massively uncontrolled manner - in sedimentary rocks, it pulverises the sedimentary rock, releasing the gases that were trapped in it, such as sulphur from evaporites in the vicinity of the Chixculub impact; other gases can include hydrocarbons, halocarbons (salt + hydrocarbons), chlorine to name a few.
The amount of gases released from within the sedimentary rocks were enough to cause mass extinctions (in an essentially extraterrestrial version of what is believed to have occurred during the Siberian Traps event). | {
"domain": "earthscience.stackexchange",
"id": 422,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "atmosphere, rocks, gas",
"url": null
} |
Let
$$I(\alpha) = \int_{-\infty}^x e^{\alpha t}dt = \frac1\alpha e^{\alpha x}$$
and recognize,
$$\int xe^{\alpha x} dx = I'(\alpha) + C = \left(\frac x\alpha - \frac1{\alpha^2}\right)e^{\alpha x}+ C$$
Thus,
$$\int xe^{6 x} dx= \left(\frac x6 - \frac1{36}\right)e^{6x} + C$$
Through power series:
Let's remember that:
$$e^x = \sum\limits_{n=0}^\infty \frac{x^n}{n!}$$
Then,
$$\int xe^{6x} dx = \int x \sum\limits_{n=0}^\infty \frac{(6x)^n}{n!} dx$$
$$\int xe^{6x} dx = \sum\limits_{n=0}^\infty \int \frac{6^n x^{n+1}}{n!} dx$$ =
$$= \sum\limits_{n=0}^\infty \frac{6^n \int x^{n+1}}{n!} dx =$$
$$\sum\limits_{n=0}^\infty \frac{6^n x^{n+2}}{n!(n+2)} dx =$$
Therefore,
$$\int xe^{6x} dx = x^2 \sum\limits_{n=0}^\infty \frac{(6x)^n}{n!(n+2)} dx$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.975576912076157,
"lm_q1q2_score": 0.8108439620025315,
"lm_q2_score": 0.8311430415844385,
"openwebmath_perplexity": 259.88980794697034,
"openwebmath_score": 0.9192872643470764,
"tags": null,
"url": "https://math.stackexchange.com/questions/3478472/can-int-xe6x-dx-be-solved-without-integration-by-parts/3478653"
} |
Question
# The bob of a simple pendulum is released when its string makes an angle $$\theta$$ with vertical. If the tension in the string is equal to thrice the weight of bob when the bob is at lowest point, the value of $$\theta$$ is:
A
30°
B
45°
C
60°
D
90°
Solution
## The correct option is D $$90°$$Apply WET between A and B,$$mg L( 1 - cos\theta) = \dfrac{1}{2} mv^{2}$$$$v = \sqrt{2gL(1 - cos \theta) }$$At pt. A,$$T - mg = \dfrac{mv^{2}}{L}$$ Also, $$T = 3\ mg$$$$3\ mg - mg = \dfrac{mv^{2}}{L}$$$$\sqrt{2gL} = v = \sqrt{2gL \big(1 - cos \theta\big) }$$$$1 = 1 - cos \theta$$$$cos\theta = 0$$$$\theta = 90^{0}$$Physics
Suggest Corrections
0
Similar questions
View More
People also searched for
View More | {
"domain": "byjus.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109503004294,
"lm_q1q2_score": 0.8028498759231874,
"lm_q2_score": 0.8152324826183822,
"openwebmath_perplexity": 2679.282528934611,
"openwebmath_score": 0.3720836341381073,
"tags": null,
"url": "https://byjus.com/question-answer/the-bob-of-a-simple-pendulum-is-released-when-its-string-makes-an-angle-theta/"
} |
star, universe, history, night-sky
However, since the night sky is dark and non-uniform, it can be said that the universe is not static and not homogeneous. However, if this was already known, what exactly is the “paradox”? Why isn’t it called Olber’s Observation or something else? Olber's Paradox was created at a time before the idea of a finite universe was accepted. (It was thought of in the 1600's). In order to resolve Olber's Paradox, you have to introduce the idea that either the universe had a beginning or it is of finite size. (Note: the solution does not require an expanding universe). So, at the time, it was a paradox. Pretty much all astronomers considered the universe to be static and infinite. Therefore, the fact that their observations didn't fit with what they expected made it a paradox. | {
"domain": "astronomy.stackexchange",
"id": 2389,
"lm_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, universe, history, night-sky",
"url": null
} |
human-biology, microbiology, bacteriology, health, diet
Are there day to day encounters, in-depth examples and references that can prove the factors which influence our gut microbes the most? Our Unique Microbial Identity (Gilbert 2015) suggests that the gut microbiome is shaped and stablized during infancy and tends to restore equilibrium if it is disturbed later in life. Antibiotics temporarily change the composition of the gut microbiome (by suppressing the growth of certain groups of bacteria more than others), but it tends to drift back to resemble its original (stable) community after treatment is stopped, likely due to the interdependency of individual strains as producers/consumers of particular compounds (i.e., some bacteria will eventually arrive to serve a particular role in the microbial community). A recent study in antibiotic treatment provides some empirical evidence of the long term effects of antibiotic treatment on the human gut microbiome. | {
"domain": "biology.stackexchange",
"id": 4215,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, microbiology, bacteriology, health, diet",
"url": null
} |
turing-machines, computability
Title: Recognizer to check if the language of a Turing machine contains a finite subset Let $B = \{ 123 \}$.
Note that $B$ is finite.
Let $L = \left \{ \left\langle M \right\rangle | M \text{ is a Turing machine such that } B \subseteq L(M) \right\}$.
Is it sufficient to show that $L$ is recognizable by checking if $M$ accepts on input $123$, and therefore $\left\langle M \right\rangle \in L$? Yes, it is sufficient.
$\langle M \rangle \in L \Longleftrightarrow B\subseteq L(M) \Longleftrightarrow M\text{ accepts all strings in }B \Longleftrightarrow M\text{ accepts }123$. | {
"domain": "cs.stackexchange",
"id": 13295,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turing-machines, computability",
"url": null
} |
php, beginner, object-oriented, mvc, laravel
// Store user
$new_user = User::create($user_data);
// Prepare email
$data['name'] = Input::get('firstName') . ' ' . Input::get('lastName');
$data['confirmation_token'] = $confirmation_token;
$mail_subject = 'Confirmação de e-mail';
// Send email
Mail::send('emails.auth.email_confirmation', $data, function ($message) use ($mail_subject)
{
$message->to(Input::get('email'))->subject($mail_subject);
});
// Log the new user in
Auth::login($new_user);
$flash_message = sprintf(
'Enviamos um email para <strong>%s</strong>. Confirme sua identidade',
Input::get('email')
);
Flash::warning($flash_message); | {
"domain": "codereview.stackexchange",
"id": 8205,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, beginner, object-oriented, mvc, laravel",
"url": null
} |
performance, google-apps-script, google-sheets
strVisible = sheet.getRange('N1').getValue(); //Get the value of N1
if (strVisible == '** Closed accounts are visible **') { //If the closed accounts are visible...
for( i=6 ; i<=lastRow ; i++) { // Start with row 6 and continue through the last row: i <= lastRow
var status = sheet.getRange("F"+i).getValue(); //Get the value of the cell.
if (status !== "") { // If there's something in the "Date Closed" cell, then that should mean it's closed
sheet.hideRows(i); // Hide the row
}
}
sheet.getRange('N1').setValue('** Closed accounts are hidden **');
} else { // Otherwise, assume the closed accounts are hidden...
for( i=6 ; i<=lastRow ; i++) { // Start with row 6 and continue through the last row: i <= lastRow
var status = sheet.getRange("F"+i).getValue(); //Get the value of the cell.
if (status !== "") { // If there's something in the "Date Closed" cell, then that should mean it's closed | {
"domain": "codereview.stackexchange",
"id": 31459,
"lm_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, google-apps-script, google-sheets",
"url": null
} |
general-relativity, black-holes, time-dilation, event-horizon, observers
$$V=c\sqrt{ {\frac {r_S} r} {\frac {r_1-r}{r_1-r_S}}}$$
was correct, where $V$ is defined as in my question.
For an observer in free-fall starting with zero velocity at a distance $r_1$ from a black hole of Schwarzschild radius $r_S$, the shift in frequency (written formally as a blue-shit, even if it is a redshift in which case it ls less than one) of the light originating from his departure point at $r_1$ is
$${\frac {\sqrt {1-r_S/r_1} }
{\sqrt {1-r_S/r}} } {\frac {\sqrt {c-V}}{\sqrt {c+V}}}$$
with $V$ as above.
When $r$ crosses $r_S$, both $(c-V)$ and $(1-r_S/r)$ become negative. Taking their square root separately would lead to imaginary numbers, but in fact their ratio remains positive and finite, and the expression
$${\frac {\sqrt {1-r_S/r_1} }{\sqrt {c+V}}}\sqrt{{\frac { {c-V}} {{1-r_S/r}}}}$$
makes sense both for $r\gt r_S$ and $r\lt r_S$ and is continuous at $r=r_S$. I have computed the value at $r=r_S$ and found it is 1/2 whatever $r_1 \gt r_C$. | {
"domain": "physics.stackexchange",
"id": 88825,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, time-dilation, event-horizon, observers",
"url": null
} |
quantum-gate, quantum-algorithms, nielsen-and-chuang, shors-algorithm, quantum-fourier-transform
My confusion lies with the second expression of point 3 in the procedure. Why is the second expression an approximation as opposed to just being equal to the first expression in point 3?
Nielsen and Chuang states on the next page that "the approximate equality in step 3 is required because $2^t$ may not be an integer multiple of r in general". But when I work through the following steps, I don't see exactly why $2^t$ must be an integer multiple of r for the equality to hold. Consider:
$$\frac{1}{\sqrt{r2^t}} \sum_{\ell=0}^{r-1}\sum_{x=0}^{2^t-1} e^{2\pi i \ell x/r} |x\rangle |\hat{f}(\ell)\rangle$$
We know by the definition of $|\hat{f}(\ell)\rangle$ in the image above,
$$|\hat{f}(\ell)\rangle = \frac{1}{\sqrt{r}}\sum_{s = 0}^{r-1} e^{-2\pi i\ell s/r} |f(s)\rangle$$
(I use $s$ as the index instead of $x$ because $x$ is already used as an index in the first expression.) Anyways, now plugging this in to the first expression, we get: | {
"domain": "quantumcomputing.stackexchange",
"id": 2171,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-gate, quantum-algorithms, nielsen-and-chuang, shors-algorithm, quantum-fourier-transform",
"url": null
} |
I am dealing with data sets containing tens of millions of (hashable) entries and simply using the Tally function to count the frequency of each unique list element ...
644 views
### Image Processing: Edge detection of the tumor on tomogram. Сalculation area of the tumor
The task is to identify the image region of the tumor. I try to use example from documentation centre: ...
472 views
### Visualizing directories
How do I plot the content of a directory and all its subdirectories into infinity using TreeForm? I've tried using a mix of ...
1k views
### Reference request for neural network programming in Mathematica
I'm looking for a good reference/book on programming neural networks in mathematica. I've been working through Freeman's "Simulating Neural Networks with Mathematica," but it is from 1994 so is quite ...
3k views
### FindRoot Domain restriction | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.926303724190573,
"lm_q1q2_score": 0.8080586265634947,
"lm_q2_score": 0.8723473796562744,
"openwebmath_perplexity": 1635.7193391857966,
"openwebmath_score": 0.704414963722229,
"tags": null,
"url": "http://mathematica.stackexchange.com/questions?page=67&sort=faq&pagesize=30"
} |
machine-learning, keras
Title: Keras functional model returning unexpected output dimensions So, this is my model:
#input layers
inputs = Input(shape = 2, name = "Input")
#hidden layers
x = Dense(6, activation = "relu", name = "dense_layer_1")(inputs)
x = Dense(4, activation = "relu", name = "dense_layer_2")(x)
punishment = Dense(3, activation = "relu", name = "punishment")(x)
#output layers
y_1 = Dense(1, activation = "sigmoid", name = "y_1")(punishment)
y_2 = Dense(1, activation = "sigmoid", name = "y_2")(punishment)
y_3 = Dense(1, activation = "sigmoid", name= "y_3")(punishment)
y_4 = Dense(1, activation = "sigmoid", name = "y_4")(x)
#functional model declaration
model = Model(inputs = inputs, outputs = [y_1, y_2, y_3, y_4])
and, when I call input_shape and output_shape on this:
print(model.input_shape)
print(model.output_shape)
(None, 2)
[(None, 1), (None, 1), (None, 1), (None, 1)] | {
"domain": "ai.stackexchange",
"id": 4066,
"lm_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, keras",
"url": null
} |
php, html, security, file-system, .htaccess
<head>
<title>CLIENT Website</title>
</head>
</html>
Just a simple page that show the web server's root directory content.
I didn't change any configuration, just added a user (with htpasswd) and my default virtual server configuration looks like this:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html | {
"domain": "codereview.stackexchange",
"id": 23409,
"lm_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, html, security, file-system, .htaccess",
"url": null
} |
c++, algorithm, programming-challenge, c++11
Edit
To put all the code together and remove the unnecessary occurence of std::string although it
#include <algorithm>
#include <vector>
struct Instruction {
Instruction(const char id)
: Identifier(id)
{}
inline bool
operator< (Instruction const& b) const {
return std::tie(nextPossibleTime, remainingUses) <
std::tie(b.nextPossibleTime, b.remainingUses);
}
char scheduleInstruction(const size_t currentTime, const size_t coolDown) {
--remainingUses;
nextPossibleTime = currentTime + coolDown + 1;
return Identifier;
}
const char Identifier;
size_t remainingUses = 1;
size_t nextPossibleTime = 0;
} | {
"domain": "codereview.stackexchange",
"id": 29414,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, programming-challenge, c++11",
"url": null
} |
navigation, move-base
Title: Navigation stack never reach goal
Hi everybody !
I have some trouble implementing the navigation stack for my own custom robot.
It has an arduino which do the position estimation and send it to ROS inside my computer.
The TF and odom messages are OK, I display them in RVIZ and the position is fine.
Then I do a "dummy laser" which always send a laser a 3meters (I don't want to use a laser for now).
=> My robot in RVIZ turning on himself.
The global planner seems to be OK, the path to go the goal is fine, but the robot does not follow the line, so mayby the problem come from the local planner.
Anyone ever had this problem ? Or do you think what can be wrong in my configuration ?
Here is my setup for the navigation stack :
base local planner :
TrajectoryPlannerROS:
max_vel_x: 0.1
min_vel_x: 0.01
max_rotational_vel: 1.0
min_in_place_rotational_vel: 0.4
acc_lim_th: 0.05
acc_lim_x: 0.005
acc_lim_y: 0.0
holonomic_robot: false | {
"domain": "robotics.stackexchange",
"id": 6536,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, move-base",
"url": null
} |
electromagnetic-radiation, astrophysics, neutron-stars, pulsars
Title: Is it possible that all neutron stars are actually pulsars? I'm assuming that what I've been told is true:
We can only detect pulsars if their beams of electromagnetic radiation is directed towards Earth.
That pulsars are the same as neutron stars, only that they emit beams of EM radiation out of their magnetic poles. | {
"domain": "physics.stackexchange",
"id": 9305,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetic-radiation, astrophysics, neutron-stars, pulsars",
"url": null
} |
haskell
Title: Reversi (Othello) game engine + command line interface I have written a game engine for the game Reversi, also called Othello. The game engine works not exactly like the official rules. For example it is possible to place "holes" on the board, places which can never hold a stone.
The game engine works fine, I have only some problems with the command line interface which includes lots of IO. Another problem I couldn't solve is exception handling. I read, that in Haskell, exceptions are rarely used. Nevertheless I was unable to refactor them to pure code. I have placed comments to the functions where the exceptions occur.
So, the main points which need review are: | {
"domain": "codereview.stackexchange",
"id": 1463,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "haskell",
"url": null
} |
(t) is given as. Therefore v(x) = c 1 + c 2x, for some constants c 1 and c 2. 3 Boundary Conditions. ( 4 – 7 ), as demonstrated below. customary units) or s (in SI units). with boundary conditions and. The basic problems for the heat equation are the Cauchy problem and the mixed boundary value problem (seeBOUNDARY VALUE PROBLEMS). I'm trying to solve the heat. Integrating twice gives X = c 1x +c 2. Initial Condition (IC): in this case, the initial temperature distribution in the rod u(x,0). The same equation will have different general solutions under different sets of boundary conditions. The method allows arbitrary conditions on all of the following: pressure gradientj sur-face temperature and its gradient, heat transfer, mass transfer, and fluid properties. We may begin by solving the Equations 8. Heat transfer is a discipline of thermal engineering that is concerned with the movement of energy. it is also constant zero). Then the initial values are filled in. The boundary condition | {
"domain": "ritornoallalira.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9888419694095656,
"lm_q1q2_score": 0.836503389555895,
"lm_q2_score": 0.8459424411924673,
"openwebmath_perplexity": 466.0453277681271,
"openwebmath_score": 0.8282039165496826,
"tags": null,
"url": "http://ritornoallalira.it/sfya/heat-equation-boundary-conditions.html"
} |
wildfire
I selected a few monitors in your state and pasted a representative one below. It looks like the smoke got bad after midnight on June 7 and then again it got even worse after midnight on June 8. This phenomena could be due to a shallower boundary layer at night which kept smoke closer to the surface. When you woke up in the morning it was probably quite smoky, but as the day progressed there was convective activity that kept more of the smoke aloft.
Yes, wildfires usually burn less at night because temperatures are cooler. However, wind, terrain, available fuels, and humidity play major roles in the dynamics of combustive activity in wildfires.
The timing of smoke impacts is circumstantial to the meteorology and geographic locations of the source and receptor. I wouldn't look for many patterns in the timing of the smoke effects that you experienced, since you are far away from the source with many dynamic meteorological phenomena in play. | {
"domain": "earthscience.stackexchange",
"id": 2672,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wildfire",
"url": null
} |
cc.complexity-theory, complexity-classes, np-complete
Title: Is Prime Bounded Quadratic Congruence NP-complete? Bounded Quadratic Congruence:
Instance: Three positive integers $a$, $b$ and $c$.
Question: Is there a positive integer $x<c$ such that $x^{2} \equiv a \, (mod \ b)$?
Bounded Quadratic Congruence is $NP$-$complete$ [1].
Prime Bounded Quadratic Congruence:
Instance: Three positive integers $a$, $b$ and $c$ such that $b$ is a prime number.
Question: Is there a positive integer $x<c$ such that $x^{2} \equiv a \, (mod \ b)$?
Is this problem $NP$-$complete$ as well?
Reference:
[1] Kenneth L. Manders and Leonard M. Adleman, NP-complete decision problems for binary quadratics, Journal of Computer and System Sciences 16 (1978), no. 2, pp. 168–184. This problem can be solved in randomized polynomial time. Look at this:
https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm
Therefore, if Prime Bounded Quadratic Congruence would be in NP-complete, then RP = NP. | {
"domain": "cstheory.stackexchange",
"id": 4370,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, complexity-classes, np-complete",
"url": null
} |
curve(.5/x, from = 0.5, to = 1)
To find the area between x = [0.5, 1] and y = [0, 1], we set up an the following integral.
$\int_0^{1}\int_\frac{1}{2}^{1} \frac{1}{2b}~db~dc$
$\int_0^{1}[\frac{ln(2b)}{2}]^1_{\frac{1}{2}}~dc$
$\int_0^{1}0.346573~dc = 0.346573$
$P(BC < \frac{1}{2}) = \frac{1}{2} + ~0.346573 = ~0.846573$
### Experimental Solution
Confirming this approximate result with the experimental value:
count = 0
trials = 10000
for (i in (1:trials)){
B = runif(1, min=0, max=1)
C = runif(1, min=0, max=1)
if(B * C < 0.5){
count = count + 1
}
}
print(count/trials)
## [1] 0.848
## Part 3: $|B - C| < \frac{1}{2}$
### Theoretical Solution
For this example, we have to find the area of the following components of the unit square:
x <- 0:1
y <- x
plot(x, y) | {
"domain": "amazonaws.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9883127395946486,
"lm_q1q2_score": 0.8033671325395598,
"lm_q2_score": 0.8128673246376008,
"openwebmath_perplexity": 1708.4024131208985,
"openwebmath_score": 0.8171460032463074,
"tags": null,
"url": "https://rstudio-pubs-static.s3.amazonaws.com/533645_39ac0ff77b074609aef409b8ccdf12a1.html"
} |
xgboost, machine-learning-model, optimization, objective-function
I would expect Brier score to be lower in the model1 since we optimise directly for it, but apparently it is not the case (see results above). What does it tell me? Does optimising brier is somehow harder? Should I use more boosting rounds? (Although this was found using grid search with brier_score_loss...) Is it explainable somehow but data distribution? (e.g. such an issue can occur in the event of unbalanced classes or something like that?) I have no idea where does that situation come from, but probably there is a reason behind that. One thing that you can do to try to optimize Brier score, is often done in Kaggle competitions. Is optimize another loss and do early stopping with the Brier score.
One Example would be minimizing classic binary logistic loss and per iteration plotting the Brier score. | {
"domain": "datascience.stackexchange",
"id": 7288,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "xgboost, machine-learning-model, optimization, objective-function",
"url": null
} |
python, performance, python-2.x, regex, pokemon
while True:
# Take input, keep in string format
poke_name = str(raw_input("Pokemon's Name: "))
if poke_name == "QUIT":
break
else:
# Print results
print indiv_search(poke_name)
# Reset all values in dictionary
for i in range(0, len(list_of_chars)):
list_of_chars[list_of_keys[i]] = 0
Example output:
Pokemon's Name: Char
Possible Choices: Charmander, Charizard, Charmeleon, Blastoise, Articuno, Venusaur, Zapdos
Note that the first line contains the raw_input() prompt and the input (separated by a space due to the prompt purposely having a space at the end to improve readability). The second line has the results of the function.
I have a few questions: | {
"domain": "codereview.stackexchange",
"id": 21358,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, python-2.x, regex, pokemon",
"url": null
} |
performance, vba, excel, outlook
'similar logic as above
If mi.SenderEmailType = "EX" Then
seAddress = mi.Sender.GetExchangeUser().PrimarySmtpAddress
If InStr(1, seAddress, varSenders(K), vbTextCompare) Then
Cells(n, 1).Value = mi.Sender.GetExchangeUser().PrimarySmtpAddress
Cells(n, 2).Value = mi.SenderName
ActiveSheet.UsedRange.RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
On Error Resume Next
Range("A3:A9999").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End If
ElseIf mi.SenderEmailType = "SMTP" Then
seAddress = mi.SenderEmailAddress
If InStr(1, seAddress, varSenders(K), vbTextCompare) Then
Cells(n, 1).Value = mi.SenderEmailAddress | {
"domain": "codereview.stackexchange",
"id": 43081,
"lm_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, vba, excel, outlook",
"url": null
} |
biochemistry
The other thing to know is: the real secret to getting into a good graduate program is to get research experience as an undergrad in the field that you want to work in. This demonstrates to the acceptance committee that you meet the two main requirements PIs have for grad students: | {
"domain": "chemistry.stackexchange",
"id": 1512,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry",
"url": null
} |
electromagnetism, electrostatics, boundary-conditions
\begin{align}\int_{0}^{a} \frac{q}{\epsilon_0} \sin\left(\frac{m\pi y}{a}\right) dy =& \int_{0}^{a} \left[ \sum_{n} -\frac{n\pi}{a} A_n \sin\left(\frac{n\pi d}{a}\right) \sin\left(\frac{m\pi y}{a}\right)\right. \\& +\left. \sum_{n} \frac{n\pi}{a} B_n \sin\left(\frac{n\pi d}{a}\right) \sin\left(\frac{m\pi y}{a}\right) \right] dy\end{align}
This brings me to my conceptual query: How does the presence of $\sin\left(\frac{n\pi d}{a}\right)$, which is essentially a constant within the integral, affect the application of the orthogonality condition in this context? I'm interested in understanding the theoretical approach and the principles at play when dealing with such boundary conditions and their implications on potential distributions, rather than seeking a direct solution to this problem. | {
"domain": "physics.stackexchange",
"id": 100092,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, electrostatics, boundary-conditions",
"url": null
} |
python, beginner, game, console
print('\n' 'You are playing as crosses')
printGrid()
while(1):
while(1): #Loop until valid input is entered
move = input('\n' 'Your turn. Make your move:' '\n')
if (move == 'help'):
print('Type the coordinates (originating from the top left) of the box you want to put a cross into in the format \'x y\' (e.g. 3 2)')
print('')
continue
if (len(move) == 3):
if (1 <= int(move[0]) <= 3 and 1 <= int(move[2]) <= 3): #Check the user has entered valid coordinates
if (boxes[int(move[0]) - 1][int(move[2]) - 1] == 0): #Check that the chosen box is empty
boxes[int(move[0]) - 1][int(move[2]) - 1] = 2 #Put an X in the box
printGrid()
break
print('Invalid input. Type \'help\' if you\'re stuck') | {
"domain": "codereview.stackexchange",
"id": 2388,
"lm_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, game, console",
"url": null
} |
gazebo
Originally posted by IsaacS on Gazebo Answers with karma: 118 on 2014-11-15
Post score: 0
Original comments
Comment by l0g1x on 2014-11-17:
I am also running into same problem. Anyone know answer to this? None of the three light sources save. It might be because they are not technically 'models'?
Comment by chapulina on 2014-11-18:
It seems that this issue has been solved from Gazebo 4.0. I just tried it out on 4.0.2: added some lights with the GUI, changed their colours and poses, and saved the world. When I loaded the world everything was alright.
Comment by l0g1x on 2014-11-20:
Do you know if its a seemless upgrade from gazebo 2.2 --> 4.x when involving ros plugins?
Comment by nkoenig on 2014-11-24:
Here is our changelog and migration guide.
This is fixed in gazebo 4.0.0 (see this issue for details).
See this tutorial for info on using gazebo4 with ROS.
Originally posted by scpeters with karma: 2861 on 2014-11-25
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 3672,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
and $781+2430 = 3211$ rather than $2554$
That would make the expected number of successes $3.36340$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018347594028,
"lm_q1q2_score": 0.8105322292978178,
"lm_q2_score": 0.8311430520409023,
"openwebmath_perplexity": 357.85089944962283,
"openwebmath_score": 0.7182802557945251,
"tags": null,
"url": "https://math.stackexchange.com/questions/2161537/rolling-10-sided-dice-with-shifting-probabilities"
} |
classical-mechanics, coordinate-systems, constrained-dynamics, degrees-of-freedom
Now, you may ask that if you change the coordinate system from Cartesian to some other, say Spherical polar coordinates, then will the dof changes? No, it will not. The choice of a coordinate system will not affect the dynamics of the system. The above circular motion in plane polar coordinates can be written as:
Put $x=rcos\theta$ and $y=rsin\theta$ in the previous equation and we get
$$\phi(t)=0$$
$$(rcos\theta)^2+(rsin\theta)^2=r^2$$
Here, we have $r=\text{constant}$ and hence the only variable that changes with time is $\theta(t)$. So there is only one degree of freedom. You choose $\theta(t)$ as your independent coordinate. As you can see, the degree of freedom is still one.
In the case of free fall of a particle, the solution is given by:
$$y(t)=\frac{1}{2}gt^2$$
where $y(t)$ is the position of the object in the $t^{th}$ second. Here, the degree of freedom is one. You only need $y$ to spot the particle at any time $t$. | {
"domain": "physics.stackexchange",
"id": 34528,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, coordinate-systems, constrained-dynamics, degrees-of-freedom",
"url": null
} |
vba, excel
End If
Next
End With
'Module 7 = WIG current & upcoming Projects, for all projects with NO Actual In-service Date Inputted
With Worksheets("Current & Upcoming Projects")
' Clear previous data on the All projects page
.Rows("3:" & Rows.Count).ClearContents | {
"domain": "codereview.stackexchange",
"id": 21547,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel",
"url": null
} |
python, performance, algorithm
for x in range(1, order+1):
for y in range(1, order+1):
if (x, y) in freespaces:
t = [(x+1, y), (x-1, y), (x, y+1), (x, y-1)]
i = 0
while i < len(t):
if maze[t[i][0]][t[i][1]] == 'X' or (t[i][0], t[i][1]) == pos or (t[i][0], t[i][1]) == finalpos:
del t[i]
else:
i += 1
if len(t) > 2:
blockstarter = t[randint(0, len(t)-1)]
kind = randint(0, 1) # 0 - vertical, 1 - horizontal
blockbuilder(kind)
else:
pass | {
"domain": "codereview.stackexchange",
"id": 37319,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, algorithm",
"url": null
} |
energy, angular-momentum, rotational-dynamics, torque, rotational-kinematics
Now after starting rolling, it collides with a wall inelastically so that linear velocity becomes say v/2, and it returns to the direction it came from. But angular velocity just after contact remains the same in magnitude and direction as it was before collision. I was able to reason out the direction of angular and linear acceleration by taking friction opposing angular velocity but did not understand why angular velocity did not change direction or magnitude?
we cannot apply it about centre of mass as external torque about centre of mass is not 0. Is my reasoning correct? | {
"domain": "physics.stackexchange",
"id": 69716,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy, angular-momentum, rotational-dynamics, torque, rotational-kinematics",
"url": null
} |
ros, macosx
Title: installation on OS X Yosemite
Has any brave soul tried this yet? Any luck?
I'm keen to upgrade, but have a working ROS installation running natively on my Mac for first time ever.
Not particularly keen to break it!!
Originally posted by lteacy on ROS Answers with karma: 1 on 2014-11-05
Post score: 0
Original comments
Comment by Tom Moore on 2014-11-05:
I tried it, and when I attempt to install the dependencies via rosdep, I get an error regarding the fact that vtk-java is missing.
Just bit the bullet, and it worked for me as a update from 10.9.5 to 10.10. However im using brew python, and not the system python that mac comes with. Im not sure if system python gets updated during this update or not, but i can confirm i have it working on hydro for yosemite. Gazebo, rviz, rqt, and roscore packages all work.
Using brew python 2.7.8
Originally posted by l0g1x with karma: 1526 on 2014-11-17
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 19959,
"lm_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, macosx",
"url": null
} |
filters, infinite-impulse-response, stability
Title: Relation between order and stability in IIR filter What is the effect of increasing order of IIR filter? does it also effects stability? If we have an IIR filter of order 6, now we change its order to 7, will there be any change in its stability? Stability depends on the pole locations, so one cannot generally say that increasing the filter order does or doesn't affect stability. It depends on how you increase the filter order. What are the additional coefficients of the denominator? (Because the denominator polynomial of the transfer function determines the pole locations). | {
"domain": "dsp.stackexchange",
"id": 7092,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, infinite-impulse-response, stability",
"url": null
} |
electric-current, conductors, heat-conduction
Title: Thermal Energy in a Conductor We know that thermal energy developed in a current-carrying resistor is given by
$U=I^2Rt$ and also $U=VIt$. So my question is- Should we say that $U$ is proportional to $I$ or $I^2$ When looking for a proportionality – or indeed any other relationship – you must decide what is to be kept constant.
In this case, if we keep R and t constant, we can say from $U=I^{2}Rt$ that U is proportional to $I^2.$
If we keep V and t constant, the equation $U=VIt$ suggests that U is proportional to I. This is true, but how can I change at all, if $V$ is kept constant? Only by our changing the resistance, R, since $I=V/R.$ So U is proportional to I if V and t are constant and R is varied.
But you were probably regarding R as a constant, in which case the second paragraph is the interpretation that makes sense.
The moral: be clear as to what is to be kept constant before deciding on how two variables are related! | {
"domain": "physics.stackexchange",
"id": 57925,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-current, conductors, heat-conduction",
"url": null
} |
java, game
private void displayIntroduction() {
System.out.println("-----------------------"
+ "----------");
System.out.println("Welcome to Java Snakes "
+ "& Ladders!");
System.out.println("------------------------"
+ "---------\n");
System.out.println("Rules:");
System.out.println("--> This is similar to the "
+ "Snakes & Ladders game played by many "
+ "people.");
System.out.println("--> This is a four-player "
+ "game.\n");
System.out.println("--> There will be a 10x10 "
+ "board containing some snakes and "
+ "ladders.\n");
System.out.println("--> The players will take "
+ "turns rolling one six-sided die.");
System.out.println("--> The player will move "
+ "ahead according to the "
+ "number rolled.\n"); | {
"domain": "codereview.stackexchange",
"id": 38126,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, game",
"url": null
} |
Rather, pick up a dice and roll it. Go for first option if the diece turns up 1 or 2. Go for second option if the dice turns up 3 or 4. Go for the third option if the dice turns up 5 or 6.
Edit: Oops, I saw that Rasmus already gave this option. Anyway I strongly suggest that you prefer this one to the other two methods given by him. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399026119353,
"lm_q1q2_score": 0.8021087705672685,
"lm_q2_score": 0.8267117940706734,
"openwebmath_perplexity": 798.5174683652874,
"openwebmath_score": 0.7787874937057495,
"tags": null,
"url": "http://math.stackexchange.com/questions/2356/is-it-possible-to-split-coin-flipping-3-ways/2357"
} |
quantum-state, qiskit
$$R_y(\theta) |0\rangle = \cos \left( \frac{\theta}{2} \right)|0\rangle + \sin \left( \frac{\theta}{2}\right)|1\rangle$$
Then $R_z(\varphi)$
$$R_z(\varphi) \left(\cos\left(\frac{\theta}{2}\right)|0\rangle + \sin\left(\frac{\theta}{2} \right)|1\rangle \right) = \cos\left(\frac{\theta}{2}\right)e^{-i\frac{\varphi}{2}}|0\rangle + \sin\left(\frac{\theta}{2}\right)e^{i\frac{\varphi}{2}}|1\rangle$$
Disregarding the global phase we will obtain the following state:
$$|\psi \rangle = \cos\left(\frac{\theta}{2}\right)|0\rangle + \sin\left(\frac{\theta}{2}\right)e^{i\varphi}|1\rangle$$
That is an arbitrary state that we wanted to create. There are also other ways (gates) to this transformation.
The code will look like this:
circuit.ry(theta, qubit[0])
circuit.rz(phi, qubit[0]) | {
"domain": "quantumcomputing.stackexchange",
"id": 1495,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-state, qiskit",
"url": null
} |
java, datetime, calculator, unit-conversion
break;
default:
return Duration.ZERO;
}
}
return totalTime;
}
private static class TimeLong{
public Long value;
public TimeLong(Long value){
this.value= value;
}
}
private static boolean tryParseLong(String value, TimeLong outVal) {
try {
outVal.value = Long.valueOf(value);
} catch (Exception e) {
outVal.value = 0L;
return false;
}
return true;
} | {
"domain": "codereview.stackexchange",
"id": 32856,
"lm_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, datetime, calculator, unit-conversion",
"url": null
} |
noise, continuous-signals
However, after light is reflected towards my detector, don't the optics PSF color the noise?
As long as you're not exciting the material in your optics to emit photons in a fashion that has some memory, e.g. through photoluminescense or phosphorence, no? You might reducing the $N$ that gets through, but that's just going to be a multiplicative factor: If there was no photon before in a smaller time interval, there will not be a new one after going through your optics. And, since the processes that your optics will have don't exhibit memory, there's also no correlation introduced.
The additional delay that your photon might induce through any PSF applies to each photon individually; however, for every time frame of fixed length, the occurrence of a photon stays independent identically distributed. And independent -> white.
In conclusion: no, the noise remains white. | {
"domain": "dsp.stackexchange",
"id": 12507,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "noise, continuous-signals",
"url": null
} |
physical-chemistry, thermodynamics
During the step,the gas and the piston was not in equilibrium;it was at the end of the step the equilibrium is achieved. So, during each step of the process the gas would be at disequilibrium . So,will it really be a reversible process? It is contradictory with the definition. But it is true that during each step, the system is at disequilibrium though infinitesimally small by $dp$ . So, why does the definition tell that at each step,there is equilibrium?
So, I have three questions: | {
"domain": "chemistry.stackexchange",
"id": 1938,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, thermodynamics",
"url": null
} |
quantum-mechanics, hilbert-space, probability, born-rule
Title: Expansion of a ket-physical interpretation of coefficients Consider I have a state represented by the Ket:
$$|\psi\rangle=\sum_i a_i |\phi_i\rangle$$
What are the physical interpretations of the coefficients $a_i$? My guess is that $|a_k|^2$ represents the probability that the 'paritcle' is in the state $ |\phi_k\rangle$ is this right? If so does it only hold for orthonormal basis or any basis? The coefficients $a_k$ quantity the projection of the state $|\psi\rangle$ onto the $k^\mathrm{th}$ basis state. So if you measure in that basis you would expect $|a_k|^2$ of the time to measure state $|\phi_k\rangle$. If you change the basis you will need to recalculate the projection coefficients.
If you are in a non-orthogonal basis the projections are not unique.
If it is not a normalized basis you must normalize the coefficients to get the correct probabilities.
You should always try to work in a orthonormal basis. | {
"domain": "physics.stackexchange",
"id": 21884,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, probability, born-rule",
"url": null
} |
java, database, homework, swing
Title: Database assignment with MySQL and Swing I have completed this assignment from Stanford CS108 on MySQL and Swing (it's part B). It would be wonderful if someone could point out my weak spots in the code and overall design.
I have uploaded code on GitHub.
Task:
In this part of the assignment you will create a GUI-based (Graphical
User Interface) application which will allow a user to access the
example metropolises database from the Database handout.
The application will provide options allowing the user to either
search for metropolises matching particular criteria or to add a new
metropolis to the database. The application should include a JTable
which displays information gathered from the metropolises database.
I ended up with this:
JMetropolisViewer.java
package databaseexercise; | {
"domain": "codereview.stackexchange",
"id": 12197,
"lm_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, database, homework, swing",
"url": null
} |
powers with rational exponents? How do you solve equations involving radicals and powers with rational exponents?. Background. Polynomials are used so commonly in algebra, geometry and math in general that Matlab has special commands to deal with them. 1 Evaluate nth Roots and Use Rational Exponents An Image/Link below is provided (as is) to download presentation. The nth root is the same as the (1/n) power. Then find the cube root. Derivative at a Point Calculator Find the value of a function derivative at a given point. Similarly we studied one method to evaluate the cube root by factor method, but the method of finding cube root of very large numbers by factorizing becomes lengthy and difficult. The symbol indicates an nth root. If one would like to have unique solutions in terms of cosines for output-formatting purposes, then one could do something like. Round your answer to the nearest hundredth. Powers and Roots In this section we’re going to take a look at a really nice way of | {
"domain": "freunde-des-historischen-schiffsmodellbaus.de",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9843363494503271,
"lm_q1q2_score": 0.8552177872568134,
"lm_q2_score": 0.8688267864276108,
"openwebmath_perplexity": 558.5759163333647,
"openwebmath_score": 0.7313296794891357,
"tags": null,
"url": "http://zjkf.freunde-des-historischen-schiffsmodellbaus.de/how-to-evaluate-nth-roots.html"
} |
Does this function represent exponential growth or exponential decay? B. If the growth rate is 3. Viruses grow at crazy rates, just look at the 2020 Corona virus scare. exponential growth and decay worksheet answers linear function word problems worksheet images worksheet math for kids. 10 6 Practice Exponential Growth And Decay Worksheet For 10th. What is the annual rate of depreciation, the rate at which the car loses value?. growth) _____exponential growth_____ 4. In exponential growth, a population’s per capita (per individual) growth rate stays the same regardless of the population size, making it grow faster and faster until it becomes large and the resources get limited. Language Worksheets For Grade 1 Tags : 48 English As A Second Language Worksheets For Adults Image Inspirations Excelent Thanksgiving Math Worksheets Kindergarten Extraordinary Exponential Growth And Decay Worksheet. Exponential Growth and Decay Worksheet In the function: y = a(b)x, a is the y-intercept and b is | {
"domain": "libreriaperlanima.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713852853137,
"lm_q1q2_score": 0.8374522814371483,
"lm_q2_score": 0.8499711794579723,
"openwebmath_perplexity": 1193.5853796587046,
"openwebmath_score": 0.3269873261451721,
"tags": null,
"url": "http://gjde.libreriaperlanima.it/continuous-exponential-growth-and-decay-word-problems-worksheet.html"
} |
machine-learning, classification
Title: What is the accuracy majority class classifier? I have an SFrame and a model:
train_data,test_data = products.random_split(.8, seed=0)
selected_words_model = graphlab.logistic_classifier.create(train_data,
target='sentiment',
features=selected_words,
validation_set=test_data) | {
"domain": "datascience.stackexchange",
"id": 11950,
"lm_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, classification",
"url": null
} |
$$\lvert (A-B)x \rvert_2 = \lvert Ax-Bx \rvert_2 \leq \lVert A-B \rVert_2 |x|_2$$
That is: the distance between the image vectors $$Ax$$ and $$Bx$$ is at most $$\lVert A-B \rVert_2 |x|_2$$. If either $$\lVert A-B \rVert_2$$ or $$|x|_2$$ are small, you can expect the images to be very close. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806540875629,
"lm_q1q2_score": 0.8128413505746142,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 187.4091766347149,
"openwebmath_score": 0.8903017044067383,
"tags": null,
"url": "https://math.stackexchange.com/questions/3331513/is-there-a-geometric-interpretation-about-the-euclidean-distance-between-of-2-ma"
} |
newtonian-mechanics
I imagine the instant you let it go, it's being largely affected by gravity, but after that instant, it begins to gain velocity in the horizontal plane. Where does this horizontal velocity come from? | {
"domain": "physics.stackexchange",
"id": 85673,
"lm_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",
"url": null
} |
electrostatics, electric-circuits, capacitance
Then it's easier to see that $K = K_1 + K_2$, because the voltages across them sum, because they are in series.
The charge on the right plate of $C_1$ comes from the left plate of $C_2$. | {
"domain": "physics.stackexchange",
"id": 2899,
"lm_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, electric-circuits, capacitance",
"url": null
} |
c#, sql, mysql, winforms, dapper
protected bool DropDownSelected(int item)
{
if (item == -1)
{
return false;
}
else
{
return true;
}
}
}
Resource
This is the Youtube video I have used to make the queries etc..
https://www.youtube.com/watch?v=Et2khGnrIqc&t=2901s Here is my take on your solution. Please note that some of the things I mention are my personal prefference.
ComplaintModel | {
"domain": "codereview.stackexchange",
"id": 39913,
"lm_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#, sql, mysql, winforms, dapper",
"url": null
} |
strings, random, lua
So I would refactor your original code into two functions. Here's one possibility:
function shuffle(self)
if type(self) ~= 'table' then return nil end
for i = #self, 2, -1 do
local randi = math.random(i)
self[i], self[randi] = self[randi], self[i]
end
return self
end
function shuffle_words(str)
local strtable = {}
for each in str:gmatch("%a+") do
table.insert(strtable, each)
end
return table.concat(shuffle(strtable), ' ')
end | {
"domain": "codereview.stackexchange",
"id": 3713,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "strings, random, lua",
"url": null
} |
java, swing, gui, sudoku, backtracking
int[][] solution = {
{8, 1, 2, 7, 5, 3, 6, 4, 9},
{9, 4, 3, 6, 8, 2, 1, 7, 5},
{6, 7, 5, 4, 9, 1, 2, 8, 3},
{1, 5, 4, 2, 3, 7, 8, 9, 6},
{3, 6, 9, 8, 4, 5, 7, 2, 1},
{2, 8, 7, 1, 6, 9, 5, 3, 4},
{5, 2, 1, 9, 7, 4, 3, 6, 8},
{4, 3, 8, 5, 2, 6, 9, 1, 7},
{7, 9, 6, 3, 1, 8, 4, 5, 2}};
int result = solver.solver(sudoku, 0);
Assert.assertEquals(1, result);
for (int i = 0; i < solution.length; i++) {
for (int j = 0; j < solution.length; j++) {
Assert.assertEquals(solution[i][j], solver.getSolution(i, j));
}
}
}
//Test: Not uniquely solveable sudoku
@Test
public void testTwo() {
SudokuSolver solver = new SudokuSolver(); | {
"domain": "codereview.stackexchange",
"id": 38407,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, swing, gui, sudoku, backtracking",
"url": null
} |
dockerfile, docker
ENV DEBIAN_FRONTEND=noninteractive
ARG TZ=Asia/Jerusalem
RUN apt-get update; \
apt-get dist-upgrade -y && \
apt-get autoremove -y && \
apt-get autoclean -y && \
apt-get install -y vim tmux bash-completion shellcheck ssh git pylint flake8 python sudo expect curl cmake build-essential python3-dev golang npm openjdk-11-jre exuberant-ctags && \
echo vim-anywhere > /etc/hostname
ARG USERNAME=yotam
RUN PASSWORD=$(openssl rand -base64 16 | tr -d "=") && \
useradd -m -s /bin/bash $USERNAME && \
usermod -aG sudo $USERNAME && \
echo "$USERNAME:$PASSWORD" | chpasswd && \
echo $PASSWORD | {
"domain": "codereview.stackexchange",
"id": 39912,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dockerfile, docker",
"url": null
} |
functional-programming
Title: Repeating functions in functional programming? Functional programming is said to be superior in many ways to imperitive programming. But I am struggling to find a simple functional way of writing:
x = f(y);
g(x,x)
Since in functional language this would be g(f(y),f(y)) thereby calling the function f twice. Whereas in imperitive language this seems more efficient. Equally one could write this as:
(x=>g(x,x)) f(y)
But then this to be exactly the same as imperitive way just rearranged slightly differently.
What is the "functional" way to repeating things in expression? In the pure functional language Haskell, you could write this as
result =
let x = f y
in g x x
or
result = g x x
where x = f y
or, indeed, as
result = (\x -> g x x) (f y) | {
"domain": "cs.stackexchange",
"id": 16765,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "functional-programming",
"url": null
} |
vba, excel, join
Dim strErrorMessage As String
'/======================================================================================================================================================
Set wbCurrent = ThisWorkbook
Call AssignWorksheets
Call FillCollections
'/==================================================
'/ Get Sheet Data into arrays, assign array bounds
'/==================================================
Dim lngActFinalRow As Long
Dim lngActFinalcolumn As Long
Dim lngAscentricFinalRow As Long
Dim lngAscentricFinalcolumn As Long
Dim strTopLeftCell As String
arrAscentricData = Array()
arrActData = Array()
Call PutSheetDataInArray(wbCurrent, wsAscentric, arrAscentricData)
Call PutSheetDataInArray(wbCurrent, wsAct, arrActData) | {
"domain": "codereview.stackexchange",
"id": 15420,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel, join",
"url": null
} |
rospy, rosservice
Title: Proper way of calling service in rospy
I have designed a service and I am using it without any problem. However, I am having doubt about the client implementation in rospy. I am calling this service many times and hence, I am concerned about its implementation. Please see the code snippet below:
class MyServiceClient:
def __init__(self):
self.service_name = 'my_service'
rospy.wait_for_service(self.service_name)
def response(self):
try:
service = rospy.ServiceProxy(self.service_name, my_service)
service_response = service(my_param)
return service_response.data
except rospy.ServiceException, e:
print 'Service call failed: %s' % e
return None
my_service_client = MyServiceClient()
for i in xrange(100):
response = my_service_client.response() | {
"domain": "robotics.stackexchange",
"id": 29408,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rospy, rosservice",
"url": null
} |
each term is a fixed multiple of the previous term. 2. An arithmetic sequence has a common difference, or a constant difference between each term. 5 . Geometric series. 625 + 0. A sequence made by multiplying by the same value each time. It's because it is a different kind of a sequence - a geometric progression . An infinite geometric sequence is a geometric sequence Problems. Then give a recursive definition and a closed formula for the number of dots in the $$n$$th pattern. For example, the sequence 2, 10, 50, 250, 1250, 6250, 31250, 156250, 781250 is a geometric progression with the common ratio being 5. The geometric mean is used to tackle continuous data series which the arithmetic mean is unable to accurately reflect. to recognize, write, and use geometric sequences. In finer terms, the sequence in which we multiply or divide a fixed, non-zero number, each time infinitely, then the progression is said to be geometric. We have three numbers in an arithmetic progression, and | {
"domain": "givelife.ph",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717468373085,
"lm_q1q2_score": 0.8443585556551937,
"lm_q2_score": 0.8558511414521922,
"openwebmath_perplexity": 333.5769276148712,
"openwebmath_score": 0.7515195608139038,
"tags": null,
"url": "http://givelife.ph/yygjmih/srlbmqa.php?gzrorzaen=geometric-sequence-examples"
} |
python, performance, beginner, algorithm, mathematics
Numpy Benchmark: 5.541609400999988
Numpy: "[[4, 3, 8], [9, 5, 1], [2, 7, 6]]" is a magic square.
Numpy Benchmark: 5.829946971000027
Numpy: "[[8, 1, 6], [3, 5, 7], [4, 9, 2]]" is a magic square.
Numpy Benchmark: 5.444178211999997
Numpy: "[[1, 14, 4, 15], [8, 11, 5, 10], [13, 2, 16, 3], [12, 7, 9, 6]]" is a magic square.
Numpy Benchmark: 5.820747697000002
Numpy: "[[9, 3, 22, 16, 15], [2, 21, 20, 14, 8], [25, 19, 13, 7, 1], [18, 12, 6, 5, 24], [11, 10, 4, 23, 17]]" is a magic square.
Numpy Benchmark: 5.5407621650000465
Numpy: "[[16, 14, 7, 30, 23], [24, 17, 10, 8, 31], [32, 25, 18, 11, 4], [5, 28, 26, 19, 12], [13, 6, 29, 22, 20]]" is not a magic square.
Numpy Benchmark: 5.764756991000013
Numpy: "[[1, 35, 4, 33, 32, 6], [25, 11, 9, 28, 8, 30], [24, 14, 18, 16, 17, 22], [13, 23, 19, 21, 20, 15], [12, 26, 27, 10, 29, 7], [36, 2, 34, 3, 5, 31]]" is a magic square.
Numpy Benchmark: 5.588026968999998 | {
"domain": "codereview.stackexchange",
"id": 36803,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, beginner, algorithm, mathematics",
"url": null
} |
molecular-biology, dna, proteins
DNA Is Degraded by Nucleases | {
"domain": "biology.stackexchange",
"id": 7575,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, dna, proteins",
"url": null
} |
Let the numbers in the array be 1,2,4,6,3,7,8,10,9 (total 9 numbers without repetition). Permutation can be done in two ways, Permutation with repetition: This method is used when we are asked to make. The algorithm is designed to take a selection of cells (from the Selection object), which should be located in the top row with no data below. Compute the permutation and print the result. * Combinations 26/05/2016 COMBINE CSECT. At each node c, the algorithm checks whether c can be completed to a valid solution. permutation f to the low-order digits (See section 4. List all permutations with a condition. Permutation with repetition Posted 06 December 2010 - 08:14 AM Im trying to make a program that implements this but I cant seem to get past inserting the characters. 0, all other syntax methods except $(handler); are deprecated. Ways to pick officers. For example: permutations without repetitions of the three elements A, B, C by two are - AB, AC, BA, BC, CA, CB. Zero factorial or 0! | {
"domain": "gattopescatore.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.982287697666963,
"lm_q1q2_score": 0.8534378486979414,
"lm_q2_score": 0.8688267711434708,
"openwebmath_perplexity": 674.6376522032865,
"openwebmath_score": 0.5992879271507263,
"tags": null,
"url": "http://ronk.gattopescatore.it/permutation-with-repetition-algorithm.html"
} |
quantum-mechanics, electromagnetism, gauge-theory, quantum-anomalies
Quantum gravity. The usual concept of spacetime is believed to be merely an approximation that can break down when quantum gravity effects are important (cf the holographic principle), so any QFT that arises as a low-energy approximation to a theory of quantum gravity probably needs to be definable in spacetimes of nontrivial topology, even though such topologies aren't directly relevant at lower energies where quantum gravity effects are negligible. The Standard Model of Particle Physics satisfies this condition: its gauged symmetry group doesn't have any (known) 't Hooft anomalies on such spacetimes. This is stated below equation 3.5 on page 24 in arXiv:1808.00009, which says that the standard model defines a consistent quantum theory in any background, of any topology. That's probably not just a random coincidence. | {
"domain": "physics.stackexchange",
"id": 80138,
"lm_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, electromagnetism, gauge-theory, quantum-anomalies",
"url": null
} |
optimization, big-picture, linear-programming, linear-equations
Would it be safe to safe that 'linear algebra/equations/programming' are of the corner stones of CS? If not then what would be a good contradiction? How often do we deal with non-linear stuff (I don't necessarily mean theoretically but also from a 'solveability' standpoint i.e. just saying it's NP doesn't cut it; there should be a good approximation to the problem and would it land up being linear?) The premise of the question is a little flawed: there are many who would argue that quadratics are the real "boundary" for tractability and modelling, since least-squares problems are almost as 'easy' as linear problems. There are others who'd argue that convexity (or even submodularity in certain cases) is the boundary for tractability. | {
"domain": "cstheory.stackexchange",
"id": 5454,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optimization, big-picture, linear-programming, linear-equations",
"url": null
} |
• Your field is the gradient of $e^{x \cos y}$, confirming it is conservative – kmm Jan 14 at 14:26
• yes, but how do I check if it is irrotational ? – NPLS Jan 14 at 14:27
You are right that the usual notion of curl is only defined for 3 dimensions. To prove a two-dimensional vector field is conservative, you can use Green's theorem which says that the following identity holds for a region $$D$$ bounded by a curve $$C$$
$$\oint (P\,dx+Q\,dy)=\iint _{D}\left({\frac {\partial Q}{\partial x}}-{\frac {\partial P}{\partial y}}\right)\,dx\,dy$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138157595306,
"lm_q1q2_score": 0.814752965801651,
"lm_q2_score": 0.8333245911726382,
"openwebmath_perplexity": 168.73944573729696,
"openwebmath_score": 0.8827499747276306,
"tags": null,
"url": "https://math.stackexchange.com/questions/3073253/how-to-check-if-a-2-dimensional-vector-field-is-irrotational-curl-0"
} |
fft, measurement
Title: Relationship Between FFT Peak, Sound Pressure Level, and Effective Value I understand that a sine wave with an effective value of 1 Pa corresponds to a Sound Pressure Level (SPL) of 94 dB. However, when I perform a Fourier Transform on such a sine wave with amplitude of $\sqrt{2}$, the FFT result shows a peak of $\frac{\sqrt{2}}{2}$, which corresponds to a SPL of 91 dB. I'm having difficulty reconciling these two observations.
How can I reconcile the FFT peak value with the SPL in dB?
Simple matlab code:
fs = 48e3;
f = 1000;
t = (0:fs-1)/fs;
x = sqrt(2)*sin(2*pi*f*t).';
X = fft(x);
X = X / length(X);
plot(mag2db((abs(X)/2e-5)))
Why the sqrt(2)?
You need to account for the fact that the DFT is conjugate symmetric, and that the energy is split in the double-sided spectrum between the negative frequencies and corresponding positive frequencies (see this answer).
As such, to preserve energy, you need to scale the result by 2 (see also): | {
"domain": "dsp.stackexchange",
"id": 12218,
"lm_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, measurement",
"url": null
} |
algorithms, approximation, probabilistic-algorithms, 3-sat
But wouldn't using the same probabilistic probabilistic $8/7$ - approximation algorithm for the MAX-3-SAT give the exact same approximation? whereas I wish to achieve a $3/2$- approximation
Thanks to anyone who helps! If you simply uniformly at random (i.i.d) color each of the vertices of $V$ by each of the three possible colors, then for every edge $e\in E$, it's endpoint will be colored by different colors w.p. $\frac{2}{3}$, hence the expected quality of the random coloring is exactly $\frac{2|E|}{3}$. We know that the optimal quality is at most $q^*\leq |E|$, hence this is a $\frac{3}{2}$ approximation. | {
"domain": "cs.stackexchange",
"id": 9053,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, approximation, probabilistic-algorithms, 3-sat",
"url": null
} |
quantum-mechanics, quantum-information, quantum-spin, wavefunction-collapse, foundations
so that nothing really happens to the physical part of the state, but the measurement guarantees that the device's state agrees with the state of the physical qubits in the basis measured!
If Alice measures $Z$ while Bob measures $X$, we should write the initial state in the $Z_A\otimes X_B$ basis,
$$ \left| \Psi_0 \right\rangle = \frac{1}{2} \left( \left| 0+ \right\rangle + \left| 0 - \right\rangle + \left|1 + \right\rangle - \left| 1 - \right\rangle \right) \, , ~~$$
so that, on measurement, we find that
$$ \left| \Psi_2 \right\rangle = \mathsf{V}^{\vphantom{\dagger}}_B \, \mathsf{V}^{\vphantom{\dagger}}_A \, \left| \Psi_0 \right\rangle = \frac{1}{2} \left( \left| 0+,0+ \right\rangle + \left| 0 -,0- \right\rangle + \left|1 +,1+ \right\rangle - \left| 1 -,1- \right\rangle \right)^{\vphantom{\prime}}_{ABab} \, ,~~$$
which, as before, is the same physical state with the outcomes (the detector's state) entangled to agree. | {
"domain": "physics.stackexchange",
"id": 95545,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-information, quantum-spin, wavefunction-collapse, foundations",
"url": null
} |
optics, microwaves
Quantum optics is the study of how individual quanta of light, known as photons, interact with atoms and molecules. This includes studying the particle-like properties of photons. Photons have been used to test many of the counter-intuitive predictions of quantum mechanics, such as entanglement and teleportation, and are a useful resource for quantum information processing.
It will depend on the particular experiment how the underlying photon structure is used and emerges in the classical light effects. The type of detection of the quantum effects will depend on the specific experiment | {
"domain": "physics.stackexchange",
"id": 55347,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, microwaves",
"url": null
} |
interval, then the derivative of the derivative is positive. 6.5 Second derivative (EMCH9) The second derivative of a function is the derivative of the first derivative and it indicates the change in gradient of the original function. The second partial Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more. A critical point is a point at which the first derivative of a function, f'(x), equals 0. To end have f00 ( x ) = 12 ( 0 ) 2 0! F ( 0 ) 2 = 0 concave down is called an inflection point, then and Geometry 8th! - 2020 Revision World Networks Ltd the last problem shows, it means we 're having trouble external! Function: second derivative is the rate of change of the first derivative and it indicates the change in of... Then and means we 're dealing potentially with one of these scenarios and our derivative... Decreasing or remaining constant - second order differentiation solver step-by-step this | {
"domain": "cers-deutschland.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.97364464791863,
"lm_q1q2_score": 0.8155441962625884,
"lm_q2_score": 0.8376199653600371,
"openwebmath_perplexity": 489.4998147384323,
"openwebmath_score": 0.769104540348053,
"tags": null,
"url": "http://cers-deutschland.org/zniq9dy/9e35a7-second-derivative-%3D-0"
} |
newtonian-mechanics, friction, collision, computational-physics, software
Title: Bouncing ball with friction I am trying to write freefem code (same language as c++) for a bouncing ball, but i am not able to notice the result of friction force. At each time the rigid ball hits the rigid ground , the horizontal velocity must be decreased. While i am trying.. the velocity is not decreased, it is still bouncing for a fixed hieght.
Any hint please, i will be thankfull for any indication that help me proceed in writing the code. Maybe the simplest model would be to assume that the ball keeps a specified fraction, $\alpha$, of its kinetic energy on each bounce, say 90%, and to require that the tangent to the ball's path just before each bounce makes the same angle with the vertical (or the line perpendicular to the ground, if the ground is not level) as the tangent to the path just after the bounce. That is, specify that the absolute value of the ratio of horizontal to vertical momentum is always constant when the ball is just above the ground. | {
"domain": "physics.stackexchange",
"id": 49958,
"lm_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, friction, collision, computational-physics, software",
"url": null
} |
virology
This is hard to believe. So, since human saliva is not a problem, can you be contaminated
by human urine or human droppings? The only way for me to interpret this logically is to
say that this virus lives at the end of the digestive tract (for both rodents and humans)
and people can be kissed because they have much better hygiene than rodents. Is there a
better interpretation?
Also, is there a simple reason why Hantavirus leaves the mouth (moving to the end of the
digestive tract) of an infected animal, but influenza does not? Viruses can have many different conditions necessary for transmission. Viruses which have membrane surface coats (like HIV ) need to be in water all the time to survive. Cold and flu viruses are more resilient and can survive on a surface such as a doorknob with a halflife of 18 hours(!). Fortunately we are also have a reasonable intrinsic resistance to cold and flu and I think most infections do not result in symptoms. | {
"domain": "biology.stackexchange",
"id": 583,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "virology",
"url": null
} |
astrochemistry, infrared, sofia
Details:
Helium has a much higher ionisation energy than hydrogen and therefore starts to recombine at higher temperatures (about 7000 K at redshifts of $\sim 2500$, compared with 3000 K and a redshift of 1100 for hydrogen). Thus in the primordial gas of hydrogen and helium, it is the helium that recombines first. There is therefore a period of time in the early universe, $120,000 < \tau < 380,000$ years, in which almost all the hydrogen is ionised, but most of the helium is in the form of atoms.
The two react to form helium hydride
$${\rm He} + {\rm H}^{+} \rightarrow {\rm He H^+}$$
As you might expect, the concentration of this molecule is low, because the temperatures were still high enough to easily radiatively disassociate it - about 1 part in $10^{21}$ at $z \sim 2000$ (Stancil et al. 1998; Galli & Palla 2013). | {
"domain": "astronomy.stackexchange",
"id": 4880,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrochemistry, infrared, sofia",
"url": null
} |
electromagnetism, lagrangian-formalism, potential-energy, aharonov-bohm
\newcommand{\blr}[1]{\left[#1\right]}
\newcommand{\clr}[1]{\left\{#1\right\}}
\newcommand{\vlr}[1]{\left\vert#1\right\vert}
\newcommand{\Vlr}[1]{\left\Vert#1\right\Vert}
\newcommand{\lara}[1]{\left\langle#1\right\rangle}
\newcommand{\lav}[1]{\left\langle#1\right|}
\newcommand{\vra}[1]{\left|#1\right\rangle}
\newcommand{\lavra}[2]{\left\langle#1|#2\right\rangle}
\newcommand{\lavvra}[3]{\left\langle#1\right|#2\left|#3\right\rangle}
\newcommand{\vp}{\vphantom{\dfrac{a}{b}}}
\newcommand{\Vp}[1]{\vphantom{#1}}
\newcommand{\hp}[1]{\hphantom{#1}}
\newcommand{\tl}[1]{\tag{#1}\label{#1}}
\newcommand{\smsup}[2]{#1^{_#2}}
$
Classically, the electromagnetic field acts on the particle via the Lorentz force law,
\begin{equation}
\mb F\plr{\mb x,t} \e q\blr{\:\mb E\plr{\mb x,t}\p \mb{\dot{x}}\bl\times\mb B\plr{\mb x,t}\Vp{A^B_C}\vp}
\tl{A-01}
\end{equation} | {
"domain": "physics.stackexchange",
"id": 98426,
"lm_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, lagrangian-formalism, potential-energy, aharonov-bohm",
"url": null
} |
physical-chemistry, adsorption, absorption
Obtain some agar gel, phenolphthalein indicator, dilute $\ce{HCl}$ and dilute $\ce{NaOH}$ solution.
Dissolve the agar in warm water, mixed with a little phenolphthalein indicator and a drop of $\ce{HCl}$, and pour into a vertical test-tube, leaving a few cm empty at top. Wait for the gel to cool to room temperature.
Add a few ml of $\ce{NaOH}$ solution at the top.
Every minute (or every ten minutes, if this is slow), mark the lower limit of the pink color.
Does the absorption, and diffusion, proceed uniformly, or does it slow with time? | {
"domain": "chemistry.stackexchange",
"id": 15996,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, adsorption, absorption",
"url": null
} |
gravitational-waves, neutron-star
Title: Why is the discovery of merging neutron stars important? I'm fairly certain people here will have heard about it, already, but apparently, two supernova leftovers clashed some 130 million years ago and some billion billion kilometres away ...
What I haven't heard yet, however, is why we should care.
I mean sure, it's an interesting phenomenon and measuring it can't have been easy.
But now that we've heard it ... what changes?
I'll admit it, I don't know particularly much about astronomy, but I'm curious:
What's the significance of having achieved this? Why does it matter whether or not we know? Reasons why this is important: | {
"domain": "astronomy.stackexchange",
"id": 2538,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravitational-waves, neutron-star",
"url": null
} |
error-correction, stim
when running a circuit, does Stim or Sinter ever set these parameters to True outside of what has been passed to them by the user?
Stim will never turn these options on without being explicitly told to do so by the user. In general, Stim forces the user to opt into anything that could reduce accuracy or that might not work on all circuits.
Sinter does use approximate_disjoint_errors=True when it infers a dem for a circuit. You can override this by specifying the detector error model in the sinter.Task instances you give to sinter.collect, instead of having sinter infer them from the circuit. | {
"domain": "quantumcomputing.stackexchange",
"id": 5529,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "error-correction, stim",
"url": null
} |
5. Please see my edited post above.
6. I found a function like this too, but it's not an odd one, as f should be.
7. Originally Posted by takis1881
I found a function like this too, but it's not an odd one, as f should be.
We can show $f$ is odd as follows:
We need to show that $f(n)=-f(-n)$. Consider 5 cases.
Case 1: $n = 0$
This is trivial.
Case 2: $n\ \text{odd and positive}$
$f(n)=n+1$
$-f(-n)=-((-n)-1)=n+1$
Cases 3-5: Similar.
8. Yes, you're right!! I mistakenly considered f(-n)=-n+1. Thank you very much for your help!! Greetings from Greece. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9871787883738261,
"lm_q1q2_score": 0.8183108146924265,
"lm_q2_score": 0.8289388146603364,
"openwebmath_perplexity": 962.6098855917944,
"openwebmath_score": 0.794380784034729,
"tags": null,
"url": "http://mathhelpforum.com/calculus/147028-function-over-z.html"
} |
organic-chemistry, biochemistry, stereochemistry
I think Maltose, which has an axial anomeric hydroxy group, will be the answer to (1) and (2), because α-glucose has has axial anomeric hydroxy group; am I right? However, I could not identify which form of maltose has axial anomeric hydroxy group. The anomeric carbon of of the second glucose unit of maltose interconverts between the alpha and the beta form in aqueous solution (just like glucose). The stereochemistry of the anomeric carbon in the glycosidic bond, on the other hand, is fixed. | {
"domain": "chemistry.stackexchange",
"id": 17408,
"lm_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, biochemistry, stereochemistry",
"url": null
} |
c#, .net, sql
private string GetTeamAbbrev(string team)
{
string abbrev= "";
string query = "SELECT Abbrev FROM Teams where Team = @team_vc";
using (SqlCommand cmd = new SqlCommand(query, conn))
{
cmd.Parameters.Add("@team_vc", SqlDbType.NVarChar).Value = team;
try
{
abbrev= Convert.ToString(cmd.ExecuteScalar());
}
catch (Exception ex)
{
// omitted for post
}
}
return (string.IsNullOrEmpty(location)) ? "None" : abbrev;
}
MainApp.CS
private DatabaseHelper dbHelper;
public MainApp()
{
InitializeComponent();
dbHelper= new DatabaseHelper(); // Instantiate database controller
}
private void someButton_Click(object sender, EventArgs e)
{
List<string> teamLeaders = new List<string>(); | {
"domain": "codereview.stackexchange",
"id": 3310,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, .net, sql",
"url": null
} |
P(YB)=0.6
P(RB)=0.4
P(YT|YB)=20/25=4/5
P(RT|YB)=1/5
P(YT|RB)=10/25=2/5
P(RT|RB)=3/5
## The Attempt at a Solution
a) $P(YT)=P(YB\cap YT)+P(RB\cap YT)=(0.6*4/5)+(0.4*2/5)=16/25$
b) $P(YB|YT)=P(YB \cap YT)/P(YT) = (0,6*4/5)/(16/25)=3/4$
It is particularly this last one I am unsure about.
Homework Helper
Gold Member
Staff Emeritus
Homework Helper
I have some problems getting conditional probability right... Does this look like it should?
## Homework Statement
Assume that there are bags of tulip bulbs in the basement, ant that they contain 25 bulbs each. yellow bags contain 20 yellow tulips and 5 red tuplips, and red bags contain 15 red and 10 yellow tulips. 60% of the bags in the basement are yellow, the others are red. One bulb is chosen at random from a random bag in the basement, and then planted
a) what is the probabilit that the tulip turns out yellow?
b) given that the tulip turns out yellow, what is the probability that it came from a yellow bag?
## Homework Equations | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9759464513032269,
"lm_q1q2_score": 0.8001719894844797,
"lm_q2_score": 0.8198933337131076,
"openwebmath_perplexity": 3433.4336136426386,
"openwebmath_score": 0.9393706321716309,
"tags": null,
"url": "https://www.physicsforums.com/threads/conditional-probability-exercise.630465/"
} |
rosbag, laserscan
Title: Command-line tool to convert raw laser scan data to bag file data
I would like to convert raw laser scan data to bag file data, preferably, command-line one. Is there as such? By the way, I have tried to simply change the extension of the file straightaway to ".bag" from ".txt", unfortunately, it does not work.
Originally posted by alfa_80 on ROS Answers with karma: 1053 on 2011-11-21
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 7373,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosbag, laserscan",
"url": null
} |
for-mulated for plane polar; spherical polar; and cylindrical polar coordinates. An equation whose variables are polar coordinates. Problems and Solutions Exercises, Problems, and Solutions Section 1 Exercises, Problems, and Solutions Review Exercises 1. Volume =integral^2_-2 integral^squareroo. Textbook solution for Multivariable Calculus 8th Edition James Stewart Chapter 15. You can copy that worksheet to your home. Search within a range of numbers Put. \begin{aligned} x &= r \cos \theta \\ y &= r \sin \theta \end{aligned} Example 1: Convert $(3, \frac{\pi}{6})$ into polar coordinates. We can do this if we make the substitution x = rcosθ and y = rsinθ. Recommended for you. The Coordinate Plane. Give the polar form for: −i, 1+i, 1−i, −1+i √ 3. Matrix algebra including addition, subtraction and. Introduction to finding double integrals in polar coordinates. To convert from Cartesian to polar coordinates, we use the following identities r2 = x2 + y2; tan = y x When choosing the value of | {
"domain": "quadri-canvas.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9901401455693091,
"lm_q1q2_score": 0.8293611464062882,
"lm_q2_score": 0.8376199572530448,
"openwebmath_perplexity": 618.100891623218,
"openwebmath_score": 0.8884478807449341,
"tags": null,
"url": "http://phoc.quadri-canvas.it/polar-coordinates-example-problems-with-solutions.html"
} |
pointcloud
I've tried to comment the transformLaserScanToPointCloud call, and no scan lines at all appears. This could mean, it somehow enters the try block.
Anyone know how to improve this? or Am i using the wrong function transformLaserScanToPointCloud call to implement building a point cloud.
Thanks in advance.
The code snippet(resides in a callback function):
sensor_msgs::PointCloud cloud; | {
"domain": "robotics.stackexchange",
"id": 8019,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pointcloud",
"url": null
} |
quantum-mechanics, spectroscopy, atoms, matter
If the energy uncertainty is characterized as $\Delta E \simeq \hbar \gamma$ and the lifetime of the state is $1/\gamma$ (in terms of a squared amplitude), then
$$\Delta E \Delta t \simeq \hbar $$ | {
"domain": "physics.stackexchange",
"id": 77020,
"lm_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, spectroscopy, atoms, matter",
"url": null
} |
newtags
Title: Where does the review status go under catkin?
Catkin complains that the <review> tag is not allowed in the package.xml.
Where should this information be maintained, now?
EDIT: I realize catkin does not support it. It is not needed for building.
The question is where does that information go? Is there now a wiki macro? Are we just throwing it away?
No reasonable user would consider this unimportant.
Originally posted by joq on ROS Answers with karma: 25443 on 2013-02-16
Post score: 3
I believe that information is not maintained in catkin anymore, mostly because it has not proven to be useful. I cannot find the post where this was discussed, though.
Originally posted by KruseT with karma: 7848 on 2013-02-16
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 12921,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtags",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.