text
stringlengths
1
1.11k
source
dict
f#, clustering printfn "\nEND 2D" ignore [<EntryPoint>] let main argv = let centroids = [ [| 0.; 0.; 0. |]; [| 20.; 30.; 40. |]; [| -40.; -50.; -60. |] ] let data = createData 1000 kmc1_2D data centroids ignore printfn "\nEND PROGRAM" let k = Console.ReadLine() 0 I would like any comment on the F# language/functional programming specifics ideom, workflow etc. (don't waste time on error handling and the mathematics). As a OO-programmer I find it rather F#-ish, but as a F# specialist you may have another opinion? 1. F# there's such an amazing opportunity as partial application. So you don`t need write: result |> List.iter(fun x -> printfn "%A" x) just: result |> List.iter printfn "%A" Read more here about it 2. In function hasChanged no need to use match, since only two possible Boolean variant: let hasChanged list1 list2 = Seq.compareWith compare list1 list2 <> 0
{ "domain": "codereview.stackexchange", "id": 20892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "f#, clustering", "url": null }
This implies that $\ker f = \{0\}$ i.e. $f$ has to be one-one. Is my logic correct? Also what's the correct answer and why? - $u_i$ are assumed to be linearly independent. You can therefore not have $a_i$ with $a_1 u_1 + \dots + a_n u_n = 0$. –  goobie Feb 12 '13 at 9:23 All four answers are wrong. The second set is linearly independent if $f$ is one-one, but it's not an "only if". Try to find an example of a linear map that isn't one-one but still preserves linear independence of some (not every!) set. –  Gerry Myerson Feb 12 '13 at 9:23 $d$ is false since if $f =0$ is the constant zero map, $f$ is linear but $f(u_i)$ are not linearly independent. –  goobie Feb 12 '13 at 9:34 In the light of @Gerry's comment, take the following linear transformation: $$T:\mathbb R^3\to\mathbb R^2$$ $$T(a_1,a_2,a_3)=(a_1-a_2,2a_3)$$ $N(T)=\{(a,a,0)\mid a\in\mathbb R\}$ and $R(T)=\mathbb R^2$. So a,b,d is wrong. Search for another for c.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668662546612, "lm_q1q2_score": 0.8067047305254311, "lm_q2_score": 0.8221891283434876, "openwebmath_perplexity": 287.9603733411195, "openwebmath_score": 0.972652792930603, "tags": null, "url": "http://math.stackexchange.com/questions/301054/condition-for-mapping-linearly-independent-vectors-to-linearly-independent-vecto" }
c++, object-oriented, embedded, device-driver DigitalInputsDriverCfg::FaultPinActivationSrcUsage::kUsed}, {DigitalInputsDriverCfg::FaultPinActivationSrc::kFaultPinActivationAlarmT1, DigitalInputsDriverCfg::FaultPinActivationSrcUsage::kUsed}, {DigitalInputsDriverCfg::FaultPinActivationSrc::kFaultPinActivation24VL, DigitalInputsDriverCfg::FaultPinActivationSrcUsage::kUsed}, {DigitalInputsDriverCfg::FaultPinActivationSrc::kFaultPinActivation24VM, DigitalInputsDriverCfg::FaultPinActivationSrcUsage::kUsed}, {DigitalInputsDriverCfg::FaultPinActivationSrc::kFaultPinActivationWireBreak, DigitalInputsDriverCfg::FaultPinActivationSrcUsage::kUsed}}}, {DigitalInputsDriverCfg::Device::kMAX22190Device_1, {{DigitalInputsDriverCfg::Input::kInput_01, DigitalInputsDriverCfg::InputEnable::kInputEnabled, DigitalInputsDriverCfg::WireBreakDetection::kWireBreakDetectionEnabled,
{ "domain": "codereview.stackexchange", "id": 40154, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, embedded, device-driver", "url": null }
newtonian-mechanics, newtonian-gravity, rocket-science, propulsion, asteroids What if we don't have several decades of advance notice? The answer is simple: This approach won't work. We'll need to use something more drastic.
{ "domain": "physics.stackexchange", "id": 37488, "lm_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, newtonian-gravity, rocket-science, propulsion, asteroids", "url": null }
2nd way: The number of permutations of a sequence AABBCEDF is $$\frac{8!}{2! 2!}$$. Now A can be choosen in 10 ways, B in 9 ways, E in 8 ways etc to yield the number $$\frac{8!}{2! 2!}*10*9*8*7*6*5$$ I understand how I'm double counting here but I want to know if there is an approach to this problem along this line of thought. Can I resolve the double counting? This answer comes out $$48$$ times larger than the correct first answer i.e in my calculation im missing a factor of $$\frac{1}{48}$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9899864311494627, "lm_q1q2_score": 0.8333959642440687, "lm_q2_score": 0.8418256432832332, "openwebmath_perplexity": 108.62003582669587, "openwebmath_score": 0.7981066703796387, "tags": null, "url": "https://math.stackexchange.com/questions/3375821/how-many-8-digit-numbers-can-be-formed-with-exactly-2-pairs-from-the-digits-0-9" }
polymers Picture of material with stains that appear (reflective): What you are seeing is most likely PVC plasticiser. Pure PVC is a hard, inflexible solid. It doesn't make for good flexible objects. To make it flexible, plasticisers are usually added. These plasticisers are often compounds like diisononyl phthalate (DINP), diisodecyl phthalate (DIDP) and di-2-ethylhexyl phthalate. These are, when pure, oily liquids. They often slowly migrate from the PVC object and can do so faster in certain circumstances (eg they will be pulled out when the PVC is in contact with hydrocarbon solvents). So, most likely, you are seeing small amounts of plasticiser migrate from the PVC and not any degradation of the polymer itself. Eventually, of course, if enough plasticiser leaves the PVC object it will become brittle and inflexible. But it may be quite some time before that happens.
{ "domain": "chemistry.stackexchange", "id": 7722, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "polymers", "url": null }
Since $A > 0$, $$\sqrt{A^2 + \mu^2 \epsilon^2} = A \sqrt{1 + \frac{\mu^2 \epsilon^2}{A^2}}.$$ Then use the linear approximation to $\sqrt{x}$ near $1$: $$\sqrt{x} \approx 1 + \frac{1}{2} (x - 1),$$ when $x$ is close to $1$. (This comes from calculus; one of the most important reasons why the subject is so useful is the ability to use it to approximate functions.) Here, you must assume that $\mu \epsilon$ is considerably smaller than $A$, so that $x = 1 + \frac{\mu^2 \epsilon^2}{A^2}$ is close to $1$. Then the approximation follows. There is an extension of the binomial theorem that applies to a binomial raised to a non-integer power. As is mentioned in another question, the formula is $$(a+x)^n = a^n + na^{n-1}x + \frac{n(n-1)}{2!}a^{n-2}x^2 + \frac{n(n-1)(n-2)}{3!}a^{n-3}x^3 + \ldots .$$ Setting $n = \frac12$, we get
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407168145568, "lm_q1q2_score": 0.8001879451068262, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 322.3305112562911, "openwebmath_score": 0.9728295207023621, "tags": null, "url": "https://math.stackexchange.com/questions/1459935/how-did-feynman-do-this-approximation-sqrta2-mu2-varepsilon2-a-biggl" }
ros, jenkins, build The rosdistro doc entry points to a hydro-devel branch, but that doesn't seem to exist in your repository (there is only a master branch). You should update the rosdistro entries for ar_sys to point to the correct branch. I expect it will start working then. Your source entry also points to hydro-devel. Also: have you instructed Bloom to use your source repository as a release repository? Edit: yes, that is 'wrong'. The Releasing a Package for the First Time tutorial clearly tells you (just above Section 2. Creating a Release Repository):
{ "domain": "robotics.stackexchange", "id": 19442, "lm_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, jenkins, build", "url": null }
$\text{(A) } 13\quad \text{(B) } 18\quad \text{(C) } 21\quad \text{(D) } 24\quad \text{(E) } 26$ ## Solution (Similarity) We are given that $BC$ is tangent to the smaller circle. Using that, we know where the circle intersects $BC$, it creates a right triangle. We can also point out that since $AC$ is the diameter of the bigger circle and triangle $ABC$ is inscribed the semi-circle, that angle $B$ is a right angle. Therefore, we have $2$ similar triangles. Let's label the center of the smaller circle (which is also the center of the larger circle) as $D$. Let's also label the point where the smaller circle intersects $BC$ as $E$. So $ABC$ is similar to $DEC$. Since $DE$ is the radius of the smaller circle, call the length $x$ and since $DC$ is the radius of the bigger circle, call that length $3x$. The diameter, $AC$ is $6x$. So, $\frac{AB}{AC} = \frac {DE}{DC} \Rightarrow \frac{12}{6x} = \frac{x}{3x} \Rightarrow 36x = 6x^2 \Rightarrow 6 = x$ $3x= \fbox{18}$ $\fbox{B}$
{ "domain": "artofproblemsolving.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936050226358, "lm_q1q2_score": 0.8113477093318263, "lm_q2_score": 0.8244619263765707, "openwebmath_perplexity": 93.77868624114534, "openwebmath_score": 0.9200828075408936, "tags": null, "url": "https://artofproblemsolving.com/wiki/index.php?title=1992_AHSME_Problems/Problem_11&diff=81571&oldid=81569" }
homework-and-exercises, kinematics, projectile The solution could be wrong , just want to confirm i'm right or not. The final answer you have shown, 58.28 m, is correct and it is correct to add gravity at one point, but there are a number of typographical errors. Here's how I would have done it: Let $v_y(t)$ be the vertical component of velocity at time $t$ (in seconds) and $v_x(t)$ be the horizontal component. $v_y(2) = 20\, \mathrm{m/s} \sin{(45)} = \frac{20}{\sqrt{2}}$ m/s (the necessary information is given in the problem) $v_y(t) = v_y(0) - gt $ (the standard kinetic equation for velocity with constant acceleration, assuming gravity acts in the negative $y$ direction). At $t=2$ s: $v_y(2) = v_y(0) - 2g $ And solving for $v_y(0)$: $v_y(0) = v_y(2) + 2g $ (notice the plus sign in here) Letting $g=10 \mathrm{m/s^2}$ and plugging in the known value for $v_y(2)$: $v_y(0) = \left(\frac{20}{\sqrt{2}} + 20\right)$ m/s
{ "domain": "physics.stackexchange", "id": 92681, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, kinematics, projectile", "url": null }
python, camera, nao, nao-driver, camera-info-manager Originally posted by AHornung with karma: 5904 on 2014-03-27 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 17425, "lm_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, camera, nao, nao-driver, camera-info-manager", "url": null }
Money Saved is the Money Earned Jo Bole So Nihaal , Sat Shri Akaal Support GMAT Club by putting a GMAT Club badge on your blog/Facebook GMAT Club Premium Membership - big benefits and savings Gmat test review : http://gmatclub.com/forum/670-to-710-a-long-journey-without-destination-still-happy-141642.html Originally posted by gurpreetsingh on 16 Mar 2010, 10:11. Last edited by Bunuel on 26 Apr 2018, 03:34, edited 1 time in total. Edited. Senior Manager Status: Upset about the verbal score - SC, CR and RC are going to be my friend Joined: 30 Jun 2010 Posts: 301 Re: Inequalities trick  [#permalink] ### Show Tags 17 Oct 2010, 16:14 gurpreetsingh wrote: I learnt this trick while I was in school and yesterday while solving one question I recalled. Its good if you guys use it 1-2 times to get used to it. So for f(x) < 0 consider "-" curves and the ans is : (a < x < b) , (c < x < d) and for f(x) < 0 consider "+" curves and the ans is : (x < a), (b < x < c) , (d < x)
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9348724567894617, "lm_q1q2_score": 0.8575609851742254, "lm_q2_score": 0.9173026533686324, "openwebmath_perplexity": 2156.2014103647634, "openwebmath_score": 0.5639657974243164, "tags": null, "url": "https://gmatclub.com/forum/inequalities-trick-91482.html" }
general-relativity, special-relativity, spacetime, speed-of-light, history Actually, the idea of spacetime, or at least spacetime as the “geometric” formulation of special relativity was not formulated by Einstein, but by his former professor, Hermann Minkowski. Einstein initially disliked the spacetime formulation, calling it “superfluous learnedness”, before utilizing it in his theory of general relativity, which allows spacetime to curve under the presence of mass-energy and “causes” gravity. Answering this question is a bit difficult because it needs to be a bit more specific. If you’re talking about spacetime in the context of special relativity/general relativity, then you’re talking about a spacetime whose metric (essentially a general form/correction for the pythagorean theorem in curved or flat space) has a signature such as $+,-,-,-$ or $-,+,+,+$. This means you write a new “pythagorean theorem” in say, Minkowski (Flat) Spacetime as $$ds^2= -c^2dt^2+dx^2+dy^2+dz^2$$ or $$ds^2= c^2dt^2-dx^2-dy^2-dz^2$$
{ "domain": "physics.stackexchange", "id": 58714, "lm_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, special-relativity, spacetime, speed-of-light, history", "url": null }
python, sqlalchemy if q and govt is True: q.updated = datetime.utcnow() q.govt_rate = rate.govt_rate elif q and govt is False: q.updated = datetime.utcnow() q.commercial_rate = rate.commercial_rate else: if govt is True: rate.govt_rate_initial = rate.govt_rate elif govt is False: rate.commercial_rate_initial = rate.commercial_rate hotel['object'].rates.append(rate) session.commit() except: session.rollback() raise Full code is below for reference. I would appreciate comments on any other portion as well! # models class Location(Base): __tablename__ = 'locations' id = Column(Integer, primary_key=True) city = Column(String(50), nullable=False, unique=True) per_diem_rate = Column(Numeric(6, 2)) hotels = relationship('Hotel', back_populates='location')
{ "domain": "codereview.stackexchange", "id": 23347, "lm_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, sqlalchemy", "url": null }
ros install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} FILES_MATCHING PATTERN "*.h" ) Originally posted by sayed on ROS Answers with karma: 1 on 2016-11-02 Post score: 0
{ "domain": "robotics.stackexchange", "id": 26125, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
#### Jameson Staff member Hi DeusAbscondus, Yes, you are correct that for constant k, $$\displaystyle \frac{d}{dx}k \cdot f(x)=k \cdot f'(x)$$ and for that reason if $$\displaystyle f(x)=5\ln(x)$$ then $$\displaystyle f'(x)=5 \cdot \frac{1}{x}=\frac{5}{x}$$. To answer one of your other questions. You can use the Latex command \text{ } to add normal looking text. $$\displaystyle \text{You can see this in effect right here}$$ #### DeusAbscondus ##### Active member Hi DeusAbscondus, Yes, you are correct that for constant k, $$\displaystyle \frac{d}{dx}k \cdot f(x)=k \cdot f'(x)$$ and for that reason if $$\displaystyle f(x)=5\ln(x)$$ then $$\displaystyle f'(x)=5 \cdot \frac{1}{x}=\frac{5}{x}$$. To answer one of your other questions. You can use the Latex command \text{ } to add normal looking text.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105280113491, "lm_q1q2_score": 0.8336840088950818, "lm_q2_score": 0.8539127510928476, "openwebmath_perplexity": 1631.350638691949, "openwebmath_score": 0.9007788300514221, "tags": null, "url": "https://mathhelpboards.com/threads/derivative-of-ln-sin5x.1602/" }
html, css #survey-form { padding: 1rem 1rem; } header { padding: 1rem 0.5rem 0.5rem 0.5rem; } header div { padding: 1.5rem 3rem; } } /* Phone 568px */ @media only screen and (max-width: 568px) { .row { flex-direction: column; } .grid-columns { grid-template-columns: 1fr; } #survey-form { padding: 0.5rem 0.5rem; } header div { padding: 1rem 1.5rem 0 1.5rem; } header img, header #description { margin: 0.5rem 0 0 0; } h1 { font-size: 2rem; } .option:last-of-type { padding-bottom: 1rem; } #p-info .col:first-of-type { margin-right: 01rem; }
{ "domain": "codereview.stackexchange", "id": 35885, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, css", "url": null }
scala, homework, breadth-first-search case class Container(id: String, capacity: Int) type State = Map[Container, Int] type Move = (Container, Container) // (from, to) // Only moves where source is non-empty and destination is non-full. def possibleMoves(state: State): List[Move] = { val containers = state.keys.toList for { s <- containers t <- containers if (s != t && state(s) != 0 && state(t) != t.capacity) } yield (s, t) } def applyMove(state: State, move: Move): State = { val from = move._1 val to = move._2 val remainingCapacity = to.capacity - state(to) val transfer = math.min(state(from), remainingCapacity) if (transfer == 0) state else state ++ List(from -> (state(from) - transfer), to -> (state(to) + transfer)) }
{ "domain": "codereview.stackexchange", "id": 8184, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scala, homework, breadth-first-search", "url": null }
mechanical-engineering, measurements, signal-processing This is a feedback control question. The short answer: connect temperature sensor and space heater to computer in a room Develop a control method/program on computer to read temperature and switch on/off heater as control method determines necessary. There are many control methods that can be used. Check out this basic Wikipedia article: Temperature control I suggests you read about P, PI, and PID control. Here's another interesting and light article: Temperature Controller Basics Handbook Find a suitable thermocouple that can withstand the temperatures of the oven. I like to over-rate. Probably a K type with 800F minimum rating. Either get an analog or digital thermocouple amplifier chip. For example, I suggest a max31855k digital output. Connect that and some type of display to a microcontroller an read the sensor once every second and write the value to the display. The Internet has plenty of examples and sample code..especially for Arduino.
{ "domain": "engineering.stackexchange", "id": 1062, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, measurements, signal-processing", "url": null }
biochemistry, structural-biology, biophysics, antibody (this book informs me that RAP1 and RAP2 have 60% sequence identity, but most sources seem to leave out RAP3-to-5, some evening telling me that the RAP family consists of RAP1A/B, RAP2A/B/C and no others!).
{ "domain": "biology.stackexchange", "id": 239, "lm_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, structural-biology, biophysics, antibody", "url": null }
rust Because memcpy doesn't guarantee any of these requirements, but passes the responsibility for doing so on to its caller, memcpy is unsafe, despite not being an unsafe fn. Using an unsafe block inside the function is not merely pointless (because memcpy does not guarantee any of the soundness requirements of copy_nonoverlapping) but actually dangerous (because memcpy itself is not marked unsafe, so it can be called from non-unsafe contexts without the compiler's gentle reminder to check the list of requirements above). We can fix this by (1) removing the unsafe block inside the function, (2) marking memcpy appropriately, and (3) adding a comment to the function to indicate what soundness requirements it has. /// A wrapper for ptr::copy_nonoverlapping with different argument order. /// Safety: see `std::ptr::copy_nonoverlapping`. unsafe fn memcpy(dst_ptr: *mut u8, src_ptr: *const u8, len: usize) { std::ptr::copy_nonoverlapping(src_ptr, dst_ptr, len); }
{ "domain": "codereview.stackexchange", "id": 40850, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rust", "url": null }
Each sheet gives origin to two other sheets according to $$S_n \to \frac{2}{3}S_n$$ so the total area is given by $$S_0+\frac{2}{3}S_0+\left(\frac{2}{3}\right)^2S_0 +\cdots = S_0\sum_{k=0}^{\infty} \left(\frac{2}{3}\right)^k = 3S_0$$ • At the step $n$ from a sheet with area $S_n$ we generate an additional area $\frac{2}{3}S_n$ – Cesareo May 15 '18 at 20:00 • From a sheet with area $S_n$ we generate two additional sheets with $\frac{1}{3}S_n$ area each. Each leaf generates two other leaves. – Cesareo May 15 '18 at 20:15 • Yes. It is the DIN A4 area. – Cesareo May 15 '18 at 20:44 • The total sum sum is $S_0+\frac{2}{3}S_0+\left(\frac{2}{3}\right)^2S_0 +\cdots$ – Cesareo May 15 '18 at 20:58 • @MaryStar I took a sheet of old school graph paper and literally graphed the first three cases and then looked each time and the total area. I suggest you do the same. It will become incredibly clear! – imranfat May 16 '18 at 15:51
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575152637946, "lm_q1q2_score": 0.8078481155839423, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 624.2721784026688, "openwebmath_score": 0.5261753797531128, "tags": null, "url": "https://math.stackexchange.com/questions/2782687/calculate-the-area-of-the-tree" }
spectroscopy, humidity Title: How to perform IR spectroscopy on silica particles at various relative humidities when they are passed through a tube using pressurized air? Surface bonds of silica particles are susceptible to humidity and frequently change between silanol and siloxane with changing RH. I want to measure how these surface bonds change with the humidity using IR spectroscopy when the particles are flown using pressurized air through a tube. Despite your question is a bit vague about the sample, I assume «when they are in motion» refers to particles passing a tube, are close to each other -- in contrast to particles floating in air.
{ "domain": "chemistry.stackexchange", "id": 13393, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectroscopy, humidity", "url": null }
newtonian-mechanics, momentum, collision Title: How multiple objects in contact are resolved in an inelastic collision, when edge normals don't "line up" In a case I understand, let's say I have an object A moving at velocity V toward 3 objects in contact B, C, and D: The momentum of A is the mass of A times its velocity. To figure out how the inelastic collision ends up when A hits B, I sum the masses of A, B, C, and D, and I divide the old momentum of A by the sum of those masses. That is the velocity all 4 objects end up with. Easy and extendable! But when objects are in contact along edges with normals not parallel to the original momentum:
{ "domain": "physics.stackexchange", "id": 10946, "lm_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, momentum, collision", "url": null }
For a sharper, but more complicated, version of (19.9.5) see Anderson et al. (1990). Other inequalities are: 19.9.6 $(1-\tfrac{3}{4}k^{2})^{-1/2}<\frac{4}{\pi k^{2}}(\mathop{K\/}\nolimits\!\left(% k\right)-\mathop{E\/}\nolimits\!\left(k\right))<(k^{\prime})^{-3/4},$ 19.9.7 $(1-\tfrac{1}{4}k^{2})^{-1/2}<\frac{4}{\pi k^{2}}(\mathop{E\/}\nolimits\!\left(% k\right)-{k^{\prime}}^{2}\mathop{K\/}\nolimits\!\left(k\right))<\min((k^{% \prime})^{-1/4},4/\pi),$ 19.9.8 $k^{\prime}<\frac{\mathop{E\/}\nolimits\!\left(k\right)}{\mathop{K\/}\nolimits% \!\left(k\right)}<\left(\frac{1+k^{\prime}}{2}\right)^{2}.$ Further inequalities for $\mathop{K\/}\nolimits\!\left(k\right)$ and $\mathop{E\/}\nolimits\!\left(k\right)$ can be found in Alzer and Qiu (2004), Anderson et al. (1992a, b, 1997), and Qiu and Vamanamurthy (1996). The perimeter $L(a,b)$ of an ellipse with semiaxes $a,b$ is given by
{ "domain": "nist.gov", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98409360595565, "lm_q1q2_score": 0.8157533789182374, "lm_q2_score": 0.828938806208442, "openwebmath_perplexity": 11227.564807042425, "openwebmath_score": 0.9508581161499023, "tags": null, "url": "http://dlmf.nist.gov/19.9#E16" }
thermodynamics, classical-mechanics, fluid-dynamics The variations in temperature and pressure are going to be related by the Clapeyron equation: $$\frac{dP}{dT}=\frac{\lambda(T)}{T[\frac{RT}{P}-V_L]}\tag{4}$$ Now the next thing we will do is increase the pressure P slightly by dP. This causes a change in the temperature dT, a change in the number of moles of liquid $dn_L$, a change in the number of moles of vapor $-dn_L$, a change in total volume dV, and a change in total enthalpy dH. For an isentropic pressure change dP, the behavior is constrained by the first law which requires that $$dH=VdP\tag{5}$$ I think I'll stop here for now an let you ask any questions you might have. I'll also let you continue the development if you'd like.
{ "domain": "physics.stackexchange", "id": 43852, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, classical-mechanics, fluid-dynamics", "url": null }
c#, sharepoint Name = Convert.ToString(item["Server"]); Service = Convert.ToString(item["Service"]); } public string Name { get; private set; } public string Service { get; private set; } public override string ToString() { return $"{Name}, {Service}"; } } Now you can simplify your function moving different responsibilities to different functions. Your public function has to implement current behavior but must be easy to extend/change (for example if logging isn't for console, if output file is not specified by its path and so on): public static void WriteServersToShutDown(string path, Context context, IEnumerable<ListItem> serversToShutdown) { if (context == null) throw new ArgumentNullException("context"); var content = ConvertToString(LoadData(context, serversToShutdown)); Log(content); WriteFile(path, content); }
{ "domain": "codereview.stackexchange", "id": 21821, "lm_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#, sharepoint", "url": null }
java, sorting, heap Now, on to the heapify() method. There's no need to call it maxHeapify(), since it's a member of the MaxHeap class. It can just take one parameter, since the data array is now an instance variable. Also, private void heapify(int i) { // You might as well start with this optimistic assumption int largestElementIndex = i; // The optimistic assumption leads to nice parallelism between the // left-child and right-child cases. int l = leftChild(i); if (l < size && data[l] > data[largestElementIndex]) { largestElementIndex = l; } int r = rightChild(i); if (r < size && data[r] > data[largestElementIndex]) { largestElementIndex = r; } // If heap consistency was locally violated if (largestElementIndex != i) { int swap = data[i]; data[i] = data[largestElementIndex]; data[largestElementIndex] = swap; // Recursively heapify the affected sub-tree heapify(largestElementIndex); } }
{ "domain": "codereview.stackexchange", "id": 4734, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, sorting, heap", "url": null }
It’s inverse is the matrix A 1 = d= b= c= a= where is the determinant of A, namely = ad bc; provided is not 0. Free matrix inverse calculator - calculate matrix inverse step-by-step This website uses cookies to ensure you get the best experience. (adsbygoogle = window.adsbygoogle || []).push({}); Condition that Two Matrices are Row Equivalent, The Null Space (the Kernel) of a Matrix is a Subspace of $\R^n$, If Generators $x, y$ Satisfy the Relation $xy^2=y^3x$, $yx^2=x^3y$, then the Group is Trivial, Torsion Subgroup of an Abelian Group, Quotient is a Torsion-Free Abelian Group. The multiplicative inverse of a matrix is the matrix that gives you the identity matrix when multiplied by the original matrix. An identity matrix with a dimension of 2×2 is a matrix with zeros everywhere but with 1’s in the diagonal. ST is the new administrator. These two types of matrices help us to solve the system of linear equations as we’ll see. You can easily nd the inverse of a 2 2 matrix. See all
{ "domain": "edenwhitemusic.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109494088426, "lm_q1q2_score": 0.8854645791795561, "lm_q2_score": 0.899121379297294, "openwebmath_perplexity": 350.9617148648594, "openwebmath_score": 0.7859293818473816, "tags": null, "url": "http://edenwhitemusic.com/6rm5l89/viewtopic.php?e57fe7=inverse-of-product-of-two-matrices" }
machine-learning, python, scikit-learn, regression, pipelines Would anyone know what is the Sklearn pipeline process like how does this work? When I butter up the boiler plate code and run it with my data set in IPython I can see this output from the pipeline process, what is this all doing? Pipeline(steps=[('stackingestimator-1', StackingEstimator(estimator=ExtraTreesRegressor(max_features=0.6500000000000001, min_samples_leaf=19, min_samples_split=14, random_state=1))), ('maxabsscaler', MaxAbsScaler()), ('stackingestimator-2', StackingEstimator(estimator=ExtraTreesRegressor(max_features=0.4, min_samples_leaf=3, min_samples_split=7,
{ "domain": "datascience.stackexchange", "id": 9589, "lm_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, python, scikit-learn, regression, pipelines", "url": null }
qiskit, circuit-construction, quantum-circuit, noise, error-mitigation #drawing the circuit qc.draw('mpl'); Next, I create the Readout Error model: from qiskit.providers.aer.noise import NoiseModel from qiskit.providers.aer.noise import QuantumError, ReadoutError # Create noise model readout_noise_model = NoiseModel() # Create the readout error matrix P = np.array([[0.9,0.02,0.02,0.02,0.02,0.01,0.01,0.0], [0.02,0.9,0.02,0.02,0.02,0.01,0.01,0.0], [0.02,0.02,0.9,0.02,0.02,0.01,0.01,0.0], [0.02,0.02,0.02,0.9,0.02,0.01,0.01,0.0], [0.02,0.02,0.02,0.02,0.9,0.01,0.01,0.0], [0.02,0.02,0.02,0.01,0.01,0.9,0.01,0.01], [0.01,0.02,0.02,0.02,0.03,0.04,0.84,0.02], [0.02,0.02,0.02,0.02,0.04,0.04,0.04,0.8]]) # Add readout error to the qubits readout_noise_model.add_readout_error(P,[0,1,2]) print(readout_noise_model) And now run the simulation: from qiskit import transpile from qiskit.providers.aer import AerSimulator backend = AerSimulator()
{ "domain": "quantumcomputing.stackexchange", "id": 3841, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, circuit-construction, quantum-circuit, noise, error-mitigation", "url": null }
c, formatting, integer int ret = 0; for (; n; n >>= 4) { ++ret; } return ret; } Here I added an explicit check for zero and reorganised the loop into a for loop, which is more normal (it keeps the test of the number and its shifting in the same place). Note also that the function is static because it is a support function for use only here. Your make_hex_string_learning has some issues. Others have already noted that you only need a simple pointer, not a double pointer. And the parameter names are too long/strange. You used n in the previous function so why not be consistent. And the string can simply be s. Your use of pad at each end of the function is unnecessary. It is used to adjust the string length and add the leading '0'. Both can be done at the start of the function. Here is a simplified version of the function: void make_hex_string_learning(unsigned n, char *s) { const char hex_lookup[] = "0123456789abcdef"; int len = num_hex_digits(n);
{ "domain": "codereview.stackexchange", "id": 17862, "lm_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, formatting, integer", "url": null }
cosmology, universe, space-expansion Maybe I am off base with my whole conception of the universe expanding so could someone please explain? So, we first have to understand what it actually means to be 'expanding.' The FLRW Metric describes our universe as homogenous (physics works the same at all points), isotropic (looks basically the same everywhere on a large scale), and expanding. In simplest terms, the further back in time we look, the closer things generally seem. Basically, objects that are not gravitationally bound to one another will get further apart as time progresses (as per the metric). Now, you seem to harbor a very common misconception in that the Universe itself has a 'center.' This is not the case. There is neither a center nor an edge to the Universe so far as we can tell. Expansion was not a single point moving outward but rather a uniform expansion at all points in the Universe simultaneously. The best way I've seen it explained (in an intuitive sense) is as follows:
{ "domain": "physics.stackexchange", "id": 18092, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, universe, space-expansion", "url": null }
ordered. Previous work. The Cost Function If lattes and cake (or labor and capital) have unit prices of pL and pK, respec-tively, then the total cost of purchasing L units of one and K units of the other is C(L,K) = pLL+pKK. Because total revenue and total cost are both expressed as a function of quantity, you determine the profit-maximizing quantity of output by taking the derivative of the total profit equation with respect to quantity, setting the derivative equal to zero, and solving for the quantity. Furthermore, each case brings something unique to the table. (6 pts) Let a and b be constants and consider the function f(x) = x+a x2 +b2. If planning is root, controlling is the fruit. C(x)=14,980+20x, R(x)=30x. Even if all the assumptions don’t hold exactly, the EOQ gives us a good indication of whether or not current order quantities are reasonable. This function is known as the cost function and will be of considerable interest to us. Thus the two optimizations are equivalent—they
{ "domain": "delleparoleguerriere.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9802808707404786, "lm_q1q2_score": 0.8037257618717885, "lm_q2_score": 0.8198933447152498, "openwebmath_perplexity": 839.5083018859096, "openwebmath_score": 0.5497791171073914, "tags": null, "url": "http://delleparoleguerriere.it/pobw/minimize-a-cost-function.html" }
c++, windows, timer Title: Windows high resolution timing class I'm attempting to implement a high resolution class used to time the execution time of functions in Windows. After using this documentation, I have come up with the following: #include <iostream> #include <windows.h> class Timer { private: LARGE_INTEGER start_count; LARGE_INTEGER stop_count; LARGE_INTEGER tick_freq; public: // Query the tick frequency upon instantiation of the class Timer() { QueryPerformanceFrequency(&tick_freq); } // Query performance counter at the start of a block of code void start() { QueryPerformanceCounter(&start_count); } // Query the performance counter at the end of a block of code, then calculate time elapsed in seconds double stop() { QueryPerformanceCounter(&stop_count); return (double)(stop_count.QuadPart - start_count.QuadPart) / tick_freq.QuadPart; } };
{ "domain": "codereview.stackexchange", "id": 40770, "lm_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++, windows, timer", "url": null }
optics, waves As you can clearly see by shifting the width of fringe in fig. It is equivalent to both dark and bright region. But in my book it's vaguely telling that the dark and bright region are separately fringe. The diagram you posted shows the fringe width being measured from the center of one light band to the center of the next light band; or from the center of one dark band to the center of the next dark band. Thus the total fringe width is equal to the 1/2 the width of one light band, plus the width of a dark band, plus a second 1/2 the width of one light band. Which is equivalent to the width of one light band plus one dark band. I don't see any inconsistency.
{ "domain": "physics.stackexchange", "id": 73270, "lm_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, waves", "url": null }
blood-circulation, antibody, antigen, blood-group, blood-transfusion Title: Are antibodies removed before blood transfusion I am an O blood group person meaning, I can donate my blood to all as I don't have any Antigen A and B. But my body does contain antibodies A and B right? If they were along with the donor blood, wouldn't they cause clotting with the recipients blood? We spent a whole period over this. My teacher said they probably remove the antibody before transfusion, but I couldn't find much info on that. I postulated that these antibodies can not work outside the donor body for some reason. Thanks for the help I quote from the below. Groups and Red Cell Antigens by Laura Dean (page 7). Available at: http://www.ncbi.nlm.nih.gov/books/NBK2265/
{ "domain": "biology.stackexchange", "id": 11100, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "blood-circulation, antibody, antigen, blood-group, blood-transfusion", "url": null }
ros, ros-hydro, cmake, catkin-tools Is there a variable I can use that points to the catkin workspace? I don't mind using a line like: ${catkin_ws_BASE_DIR}/src/package2/src/common.cpp Anyone able to help me solve this in an elegant way? Cheers, Nap Originally posted by Nap on ROS Answers with karma: 302 on 2015-09-07 Post score: 1 Original comments Comment by Felix Duvallet on 2015-09-07: Have you tried ${Package2_DIR} (note: not SOURCE_DIR)? Comment by Nap on 2015-09-07: ${package2_DIR} returns: "/home/me/catkin_ws/devel/share/package2/cmake" Anyone able to help me solve this in an elegant way? Do you have a reason for wanting to directly include src files from package2 into programA? We normally (not just in ROS / with catkin) solve these kind of things by creating a library in package2, making sure package2/include is on the include path of whatever pkg programA is in, and then linking libpkg2 to programA. I would consider using libraries like this an elegant way. Edit:
{ "domain": "robotics.stackexchange", "id": 22575, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-hydro, cmake, catkin-tools", "url": null }
python, python-3.x, django response = { 'description': textwrap.dedent(description), 'created_vms': [vm_1, vm_2, vm_3, vm_4], 'created_dbs': [db_1, db_2, db_3, db_4, db_5, db_6], 'created_clusters': [cl_1, cl_2], } return response def get_description(self, validated_data): level = validated_data['level'] if level == 'Standalone': return self.standalone(validated_data) elif level == 'Cluster (DR)': return self.cluster_dr(validated_data) elif level == 'Geocluster (HA + DR)': return self.geocluster_ha_dr(validated_data) else: return 'No description available' Review What I'm looking for in this review is to make this code a bit more abstract as it became a bit messy. It looks like if I were to add more options this would become hardly maintainable in the future. What I'm not looking for in a review:
{ "domain": "codereview.stackexchange", "id": 31882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, django", "url": null }
of a graph $$G$$ can be represented as a horizontal line with ordered vertices such that all edges point to the right. Each test case contains two lines. Topological sorting for D irected A cyclic G raph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Microsoft. Topological Sort. In a real-world scenario, topological sorting can be utilized to write proper assembly instructions for Lego toys, cars, and buildings. Data Structures and Algorithms – Self Paced Course. Flipkart. Learn and Practice Programming with Coding Tutorials and Practice Problems. See all topologicalsort problems: #topologicalsort. Topological Sorting. Given a partial order on a set S of n objects, produce a topological sort of the n objects, if one exists. if the graph is DAG. The recipe is really quite simple: 1 egg, 1 cup of pancake mix, 1 tablespoon oil, and $$3 \over 4$$ cup of milk. Depth-First Search Approach The idea is to go through the
{ "domain": "kiev.ua", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214491222696, "lm_q1q2_score": 0.8614374230151711, "lm_q2_score": 0.8933094081846421, "openwebmath_perplexity": 1161.597526904899, "openwebmath_score": 0.5246270895004272, "tags": null, "url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe" }
c#, multithreading, queue private void FormMain_Load(object sender, EventArgs e) { StartPersistingTask(); } private async Task StartPersistingTask() { var chunkOfPacketsToInsert = 100; try { while (true) { if (PacketQueue.Count > chunkOfPacketsToInsert) { int counter = 0; var chunkToBulkInsert = DataHelper.CreateBulkCopyDataTable(); while (counter <= chunkOfPacketsToInsert) { PacketItem packetItem = null; PacketQueue.TryDequeue(out packetItem); if (packetItem != null) { chunkToBulkInsert.Rows.Add(Guid.NewGuid(), packetItem.AtTime, packetItem.GPSTrackerID, packetItem.PacketBytes); counter++; } else { break; } };
{ "domain": "codereview.stackexchange", "id": 41220, "lm_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#, multithreading, queue", "url": null }
• JMoravitz, that would be 5 successes - I am afraid that I am not sure how to make my calculations account for this (you will have to pardon my limited skill in this regard) as for your second comment, I am not sure I understand - does that mean for 2 successes the probability is (0.5^5)-(0.4^5)-(0.3^5)? I tried calculating that for all possibilities, but the value was still not 100% Thanks for the rapid reply though! – monteckine Feb 26 '17 at 0:11
{ "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" }
javascript, array, angular.js I feel that this is not the most efficient way to accomplish this, how should this be refactored? Would you recommend lodash in this scenario? This can easily be done with array.reduce let resultsByMethod = data.reduce((results, result) => { if(!results[result.method]) results[result.method] = []; results[result.method].push(result); return results; }, {}); The end result is something like: { GET: [...], POST: [...], PUT: [...], DELETE: [...] } One disadvantage in your approach is when it encounters a method that's note one of the 4 you're comparing.
{ "domain": "codereview.stackexchange", "id": 18903, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, array, angular.js", "url": null }
evolution, senses Many echolocating bats use the stapedius muscle to separate the inner ear bones when they emit their call so they are not deafened by their own call. Their ears are highly sensitive to the very frequency they are making so they need a way to protect against it. They are only deafened for 2-8ms but that is enough to protect their hearing while still being able to hear any echo. Source
{ "domain": "biology.stackexchange", "id": 7666, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "evolution, senses", "url": null }
machine-learning Title: Machine learning algorithm for predicting binary decisions on a large, underrepresented dataset I would like create a classifier which works on a relatively large (about 30k samples) dataset with circa 20 attributes and a binary decision, however such, which contains relatively small amount of samples with, say, "Yes" decision. That is, the data for building a classifier seems underepresented.
{ "domain": "cs.stackexchange", "id": 6624, "lm_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", "url": null }
c++, c++11, blockchain Which is an anonymous/unnamed return value. While your question is tagged C++11, I'll opine that it's a nice practice still to be aware of the newer standards and that with C++17 you're guaranteed copy elision. I suspect that compilers of earlier standard implementation are also likely more able to support copy elision when using unnamed return values. Copy elision tends to help with performance. Moreover, returning output through return values encourages value semantics, aids with constness, and I find it makes it easier for people to reason about the code. As to constexpr, I haven't seen it increase performance much of code I've used it with. OTOH, I love what recognizing code as constexpr means — computable at compile time — and I agree with Scott Meyers recommendation: use constexpr whenever possible (from Item 15 of his Effective Modern C++ book). A related nicety IMO is that types having constexpr constructors can then satisfy the LiteralType concept.
{ "domain": "codereview.stackexchange", "id": 30554, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, blockchain", "url": null }
homework-and-exercises, newtonian-mechanics, rotational-dynamics, angular-velocity A ring of mass $M_1$, radius $R_1$, and rotational inertia $MR^2$ is initially sliding on a frictionless surface at a constant velocity $v_0$ to the right, as shown in the image. At time $t=0$, it encounters a surface with coefficient of friction $\mu$ and begins sliding and rotating. After travelling a distance $L$, the ring begins rolling without sliding. Express all answers to the following in terms of $M$, $R$, $v_0$, $\mu$, and fundamental constants, as appropriate. A) Starting from Newton's second law in either translational or rotational form, as appropriate, derive a differential equation that can be used to solve for the magnitude of the following as the ring is sliding and rotating. i) The linear velocity $v$ of the ring as a function of time $t$. ii) The angular velocity $\omega$ of the ring as a function of time $t$ B) Derive an expression for the magnitude of the following as the ring is sliding and rotating:
{ "domain": "physics.stackexchange", "id": 50395, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, rotational-dynamics, angular-velocity", "url": null }
be drawn with N vertices and M edges.A simple graph is a graph that does not contain multiple edges and self loops. generate link and share the link here. A graph with N vertices can have at max n C 2 edges. We will still … Similar Questions: Find the odd out. Below is the implementation of the above approach: edit Without further ado, let us start with defining a graph. Triangle-free graphs may be equivalently defined as graphs with clique number ≤ 2, graphs with girth ≥ 4, graphs with no induced 3-cycle, or locally independent graphs. The number of edges in a regular graph of degree d and n vertices is nd n+d nd/2 maximum of n,d. acknowledge that you have read and understood our, GATE CS Original Papers and Official Keys, ISRO CS Original Papers and Official Keys, ISRO CS Syllabus for Scientist/Engineer Exam, Dijkstra's shortest path algorithm | Greedy Algo-7, Prim’s Minimum Spanning Tree (MST) | Greedy Algo-5, Kruskal’s Minimum Spanning Tree Algorithm | Greedy Algo-2, Disjoint Set
{ "domain": "docufile.mx", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105314577313, "lm_q1q2_score": 0.8004704899311906, "lm_q2_score": 0.8198933271118222, "openwebmath_perplexity": 312.5254391532358, "openwebmath_score": 0.5205710530281067, "tags": null, "url": "http://www.docufile.mx/misbhv-shorts-kixrfb/maximum-number-of-edges-in-a-graph-with-n-vertices-cde799" }
java, error-handling, http, eclipse Quick reformat I messed with the code, and got the following: try { URL url = new URL(this.web_service_url); HttpURLConnection httpconn = (HttpURLConnection) url.openConnection(); httpconn.setRequestMethod("GET"); //System.out.println(httpconn.getResponseMessage()); if (httpconn.getResponseCode() == HttpURLConnection.HTTP_OK) { try (BufferedReader breader = new BufferedReader(new InputStreamReader( httpconn.getInputStream()));) { String line = null; while ((line = breader.readLine()) != null) { jsonResponse.append(line).append("\n"); } } // System.out.println(jsonResponse); // display_json_results(jsonResponse); } } catch (MalformedURLException mue) { Log.warn("Invalid URL " + this.web_service_url, mue); MessageDialog.openError(Display.getDefault().getShells()[0],
{ "domain": "codereview.stackexchange", "id": 36071, "lm_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, error-handling, http, eclipse", "url": null }
time-complexity, space-complexity, space-time-tradeoff, time-hierarchy $L_2 \in SPACE(g(n))$: By the definition of $L_2$, $L_2$ can be decided in space $O(n^3)$. Thus, $L_2 \in SPACE(n^3) = SPACE(g(n))$, as desired. $L_1 \not\in SPACE(g(n))$: Suppose for the sake of contradiction that $L_1 \in SPACE(g(n)) = SPACE(n^3)$. We know that $SPACE(n^3) \subseteq TIME(2^{O(n^3)}) \subsetneq TIME(2^{n^4})$. Thus, there exists a decider for $L_1$ which runs in time $O(2^{n^4})$. This directly contradicts the definition of $L_1$. Then by contradiction, we see that $L_1 \not\in SPACE(g(n))$. $L_2 \not\in TIME(f(n))$: Suppose for the sake of contradiction that $L_2 \in TIME(f(n))$. This means that there exists a constant $c$ and an algorithm $A$ deciding $L_2$ such that on any input of size $n$, algorithm $A$ terminates in time $c\times f(n)$.
{ "domain": "cstheory.stackexchange", "id": 4257, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time-complexity, space-complexity, space-time-tradeoff, time-hierarchy", "url": null }
audio, modulation, impulse-response, bpsk Auto-correlation for my BPSK signal looks good - one peak with two side lobes. The suggestion to use a higher frequency for better resolving power was helpful - switching from 1600hz to 6400 hz seemed to make things more accurate. However, I'm still finding that the cross-correlation often peaks shockingly late. For example, take a look at this recording. This is a device recording itself playing a 6400hz BPSK signal. The position of the cursor in Audacity marks the place where the signal starts to deviate from background noise (at least, to the naked eye). However, take a look at the cross-correlation output, with the exact same moment marked by the cursor in Audacity.
{ "domain": "dsp.stackexchange", "id": 10198, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "audio, modulation, impulse-response, bpsk", "url": null }
Hardly anyone uses the inertial frame POV because having a time-varying inertia tensor is just too nasty. So how does that rotating frame formulation arise? The answer lies in what some call the kinematics transport theorem, $$\left(\frac {d\vec q} {dt}\right)_I = \left(\frac {d\vec q} {dt}\right)_R + \vec \omega \times \vec q$$ where $\vec q$ is any vectorial quantity in $\mathbb R^3$, the subscripts $I$ and $R$ on the derivatives denote the derivatives from the perspective of an inertial frame versus a rotating frame, and $\vec \omega$ is the angular velocity of the rotating frame with respect to the inertial frame. Substituting $\vec q$ with $\vec L = \mathrm I \vec \omega$ yields $$\vec \tau = \dot {\vec L}_I = \dot {\vec L}_R + \vec \omega \times \vec L = \mathrm I \dot {\vec \omega} + \vec \omega \times \mathrm I \vec \omega$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924761487654, "lm_q1q2_score": 0.8141603081419133, "lm_q2_score": 0.8376199694135332, "openwebmath_perplexity": 260.9030930562996, "openwebmath_score": 0.8472298383712769, "tags": null, "url": "https://physics.stackexchange.com/questions/139630/relation-between-torque-and-moment-of-inertia" }
ions, nuclear Title: Notation of beta decay Is it an ion or a neutral atom that is created through beta decay? For example: $_6^{14}\mathrm C \to ~ _7^{14}\mathrm N + \mathrm e^- + \mathrm{v{_e}}^{-}$ Isn't $_7^{14}N$ an ion since neutron gives us only a proton and an electron, not a proton and 2 electrons? If so, why isn't it stated in the example above (it's from Wikipedia)? An ion is created. Usually this is not noted down in the nuclear reaction because while talking of nuclear reactions we only concern ourselves about nuclei, not the entire atom. The reaction is to be read as "A 14-$\ce{C}$ nucleus decays into a 14-$\ce{N}$, an electron, and an antineutrino." Also, note that the neutrino has no charge.
{ "domain": "chemistry.stackexchange", "id": 785, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ions, nuclear", "url": null }
Polynomial Function f evinda Well-known member MHB Site Helper Hi!!! I have also an other question Knowing that $f$ is a polynomial function,how can I show that there is a $y \in \mathbb{R}$,such that $|f(y)|\leq |f(x)| \forall x \in \mathbb{R}$ ? Last edited: ZaidAlyafey Well-known member MHB Math Helper Are you sure of the question? how can all polynomials be bounded below by a positive real number ? evinda Well-known member MHB Site Helper Are you sure of the question? how can all polynomials be bounded below by a positive real number ? I forgot the absolute value at $f(x)$.Sorry!! ZaidAlyafey Well-known member MHB Math Helper Let us take two cases [1] If $f$ intersects the x-axis at $$\displaystyle y=a$$ then since $|f(a)|=0$ we have $|f(x)| \geq |f(a)|$. [2] If $f$ doesn't intersect the x-axis then it is a polynomial of even degree and you can find the minimum of $$\displaystyle |f|$$ by differentiation. evinda Well-known member MHB Site Helper Let us take two cases
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9740426382811476, "lm_q1q2_score": 0.8219898083006325, "lm_q2_score": 0.8438950986284991, "openwebmath_perplexity": 161.84590804391328, "openwebmath_score": 0.8299232125282288, "tags": null, "url": "https://mathhelpboards.com/threads/polynomial-function-f.8909/" }
mechanical-engineering, gears 330 m/min (3rd gear) maintainable up to 1,500(?) kgf 185 m/min (2nd gear) 113 m/min (1st gear) And the maximum full-load line speed at 12,000 kgf (even on third gear, I presume) is 68 m/min. The smaller 147-horsepower (110 kW) hoist winch also, apparently, has 3 speeds (these are again on 1-fall operation): 261 m/min (3rd gear) maintainable up to 1,100(?) kgf 157 m/min (2nd gear) 91 m/min (1st gear) And the maximum full-load lifting speed (again, on any gear) is 45 m/min. NOTES: "No-Load Speed" is at zero hook load (when the crane is lifting only the hook-block) kgf = Kilogram-force *Logical OR ** "Infinitely-variable" = "Continuously variable down to zero speed" My questions are:
{ "domain": "engineering.stackexchange", "id": 1355, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, gears", "url": null }
coordinate-systems, vectors, linear-algebra, covariance Title: Why do basis vectors transform covariantly? I have some trouble understanding transformation rules of basis vectors. My question/goal is to obtain a mathematical derivation to see why basis vectors transform covariantly and other vectors (components) contravariantly. I have three questions. Question 1: why can't I use the vector component transformation equation (with $R_{ji}$) to transform each components of the old basis vectors into the new ones? It should work for any vector right? Question 2: why is $R_{ji}$ sometimes expressed as $\frac{\partial x^{'i}}{\partial x^j}$ as I have read in some sources? Question 3: as the change of basis should be independent of any vector in particular why do I still have vector component terms in my derivation?
{ "domain": "physics.stackexchange", "id": 77238, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "coordinate-systems, vectors, linear-algebra, covariance", "url": null }
nlp, named-entity-recognition However, when you train any kind of NLP model, which does rely on dictionary while training, you may get real world performance way lower than your initial testing would report, unless you can include all objects of interest into the gazetteer (and why then you need that model?) because your trained model will rely on the feature at some point and, in a case when other features will be too weak or not descriptive, new objects of interest would not be recognized. If you do use a Gazetteer in your models, you should make sure, that that feature has a counter feature to let model balance itself, so that simple dictionary match won't be the only feature of positive class (and more importantly, gazetteer should match not only positive examples, but also negative ones).
{ "domain": "datascience.stackexchange", "id": 640, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nlp, named-entity-recognition", "url": null }
human-anatomy, human-physiology In addition, there are various somewhat common congenital defects that due to the relatively peaceful nature of our day-to-day are never discovered, but can have a significant effect on response to blows to the head. (This is part of why, if you're ever in a car accident, paramedics will be very keen to evaluate you, even if you have no outwards signs of injury.) Long story short: Punching someone in the head is a bad idea, unless they pose a very direct threat to you; and you mean to incapacitate them; and you don't mind said incapacitation being potentially permanent (to the point of death).
{ "domain": "biology.stackexchange", "id": 5884, "lm_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-anatomy, human-physiology", "url": null }
general-relativity Title: Conformal Ricci Scalar computation in Baumgarte's Ex. 3.3 I'm asked to show that contracting indices of this Ricci Tensor: \begin{align} \newcommand{\ogamma}{\overline{\gamma}} \newcommand{\OGamma}{\overline{\Gamma}} \newcommand{\OD}{\overline{D}} R_{ij} = & \; \overline{R}_{ij} -2 \left( \OD_i \OD_j \ln \psi + \ogamma_{ij} \OD^2 \ln \psi \right) \notag \\ & + 4 \left( \left( \OD_i \ln \psi \right) \left( \OD_j \ln \psi \right) - \ogamma_{ij} \ogamma^{kl} \left( \OD_k \ln \psi \right) \left( \OD_l \ln \psi \right) \right). \end{align} using the metric $\gamma^{ij} = \psi^{-4} \ogamma^{ij}$, where $\psi$ is a function of a spatial slice (in 3+1 decomposition). My solution is: \begin{align} R = & \; \gamma^{ij} R_{ij} = \psi^{-4} \ogamma^{ij} R_{ij} \\ = & \; \psi^{-4} \ogamma^{ij} \left( \overline{R}_{ij} -2 \left( \OD_i \OD_j \alpha + \ogamma_{ij} \OD^2 \alpha \right) + 4 \left(
{ "domain": "physics.stackexchange", "id": 67767, "lm_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", "url": null }
fluid-dynamics the intuitive assumption (3); the undefined constants $C$ and $D$.
{ "domain": "physics.stackexchange", "id": 2094, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics", "url": null }
mathematics, integration Title: Cancelling the partial of a coordinate, $\partial q$, with the element of a coordinate, $dq$ in Physics I've seen in many books, things like this ( I will be simple ): $$\int \frac{\partial f}{\partial q} dq=\int df$$ where $f$ is a function of $q$ and other coordinates. I just axiomatically assumed that this operation was physically right, without questioning it. But I did know that it was mathematically wrong. So, why we can do this? Is this some kind of approximation? If we have a function $f$ that is a function of several variables $p$, $q$, $r$, etc then we can write a total derivative of $f$ as: $$ df = \frac{\partial f}{\partial p} \text{d}p + \frac{\partial f}{\partial q} \text{d}q + \frac{\partial f}{\partial r} \text{d}r + \, ... $$ If we're holding all the variables constant except for $p$, so $\text{d}q = \text{d}r = 0$ then this simplifies to: $$ df = \frac{\partial f}{\partial p} \text{d}p $$
{ "domain": "physics.stackexchange", "id": 26335, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mathematics, integration", "url": null }
c, json, curl #endif /* STRTOI_H */ strtoi.c: #include "strtoi.h" #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <limits.h> #include <ctype.h> strtoi_errno strtoi(int *restrict out, const char *restrict nptr, int base) { /* * Null string, empty string, leading whitespace? */ if (!nptr || !nptr[0] || isspace(nptr[0])) { return STRTOI_INCONVERTIBLE; } char *end_ptr; const int errno_original = errno; /* We shall restore errno to its original value before returning. */ const long int i = strtol(nptr, &end_ptr, base); errno = 0;
{ "domain": "codereview.stackexchange", "id": 45387, "lm_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, json, curl", "url": null }
• Did you try to solve the last equation for $f(z)$? It is not that difficult. Start by multiplying with $(w_1-w_2)/(w_1-w_3)$. – Martin R Aug 29 '20 at 20:36 • Yes, I did. In that case, I end up with $\frac{f(z)-w_2}{f(z)-w_3}$ on the RHS, and I don't know how to solve this for $f(z)$. – J.Galt Aug 29 '20 at 20:42 • Then multiply with $f(z)-w_3$ and collect the terms containing $f(z)$ on one side ... – Martin R Aug 29 '20 at 20:44 • Hm, thank you for the tip! I also tried this before but couldn't cleanly separate the $f(z)$ from the $z$. I must have made an error - I'll revisit my calculations and see where the error is. – J.Galt Aug 29 '20 at 20:46 • You can also write the right-hand side as a composition of simple transformations and reverse these in opposite order. – Martin R Aug 29 '20 at 20:48 multiply up $$(f(z)-w_3)(w_1-w_2)(z-z_2)(z_1-z_3)=(f(z)-w_2)(w_1-w_3)(z_1-z_2)(z-z_3)$$ put • $$A = (w_1-w_2)(z-z_2)(z_1-z_3)$$ • $$B = (w_1-w_3)(z_1-z_2)(z-z_3)$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357604052423, "lm_q1q2_score": 0.8282078973694056, "lm_q2_score": 0.8459424373085146, "openwebmath_perplexity": 246.06725891340855, "openwebmath_score": 0.8803375959396362, "tags": null, "url": "https://math.stackexchange.com/questions/3807648/deriving-a-m%C3%B6bius-transformation-specified-by-three-points" }
solutions, electrons, metal, optical-properties, solvated-electrons Sorry I could only speak about water. In general an aqueous electron might behave quite differently in other solvents, but it's definitely always going to be quite quantum mechanical. The fact it can be bound by purely correlation effects tells us what kind of beast we're dealing with.
{ "domain": "chemistry.stackexchange", "id": 8602, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solutions, electrons, metal, optical-properties, solvated-electrons", "url": null }
ros, joy-node, joy, joystick Title: Is it possible to set xbox controller rumble using JoyFeedback? I see when I use rxgraph while running the joy_node for an xbox controller that it does not subscribe to JoyFeedback or JoyFeedbackArray. Is there any other way to set the rumble for the xbox controller? Originally posted by kb4722 on ROS Answers with karma: 21 on 2013-07-16 Post score: 2 Original comments Comment by lucasw on 2013-10-24: I'm considering buying a Logitech Rumble Gamepad F510, I'd really like to know if ROS can set the rumble there also (or if rumble works or it from Linux at all). The p3joy page mentions supporting the JoyFeedbackArray ( http://mirror.umd.edu/roswiki/ps3joy.html?distro=hydro ). Comment by Cyril Jourdan on 2015-03-30: Did you manage to get the xbox controller rumble working from ROS ? I made this feedback node a while ago (and haven't tried it recently): https://github.com/lucasw/joy_feedback_ros It uses a custom message type rather than JoyFeedback.
{ "domain": "robotics.stackexchange", "id": 14933, "lm_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, joy-node, joy, joystick", "url": null }
botany, taxonomy vascular plants). Reducing this redundant complexity is crucial for decision-making in conservation politics or the projection of vegetation change under future climatic conditions (Woodward & Cramer, 1996).
{ "domain": "biology.stackexchange", "id": 3426, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "botany, taxonomy", "url": null }
qiskit, programming, quantum-gate Title: ctrl_state 'order' of control( ) I am qurious about the order of ctrl_state The Quantum Circuit what I expected is this. q1 is controled when '0' and q2 and a3 is controled when '1' So I wirte code that is ctrl_state='011' But what I got is this. Why I got oposite form like this... What is the principle of this. from qiskit import* from qiskit.extensions import UnitaryGate matrix_V2_2=[[1,0],[0,1]] Won_gate = UnitaryGate(matrix_V2_2,label='Won').control(num_ctrl_qubits=3, ctrl_state='011') main_circuit=QuantumCircuit(4,4) main_circuit.append(Won_gate ,[1,2,3,0]) %matplotlib inline main_circuit.draw(output='mpl') This is because Qiskit uses little-endian bit ordering. That means, in your case ctrl_state should be $q_3 q_2 q_1$. You can find more details here and here.
{ "domain": "quantumcomputing.stackexchange", "id": 4400, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, programming, quantum-gate", "url": null }
c++, sqlite, wrapper int rc = 0; while ((rc = sqlite3_step(stmt)) != SQLITE_DONE) { std::map<std::string, sqlite_data_type> row; for (int i = 0; i < num_cols; i++) { switch (sqlite3_column_type(stmt, i)) { case SQLITE3_TEXT: { const unsigned char* value = sqlite3_column_text(stmt, i); int len = sqlite3_column_bytes(stmt, i); row[column_names[i]] = std::string(value, value+len); } break; case SQLITE_INTEGER: { row[column_names[i]] = sqlite3_column_int(stmt, i); } break; case SQLITE_FLOAT: { row[column_names[i]] = sqlite3_column_double(stmt, i); } break; case SQLITE_BLOB: { const uint8_t* value = reinterpret_cast<const uint8_t*>(sqlite3_column_blob(stmt, i));
{ "domain": "codereview.stackexchange", "id": 41239, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, sqlite, wrapper", "url": null }
Theorem 2. Let $g\colon[0,1]\to[0,1]$ be the Cantor function. Then there do not exist homeomorphisms $\varphi,\psi\colon[0,1]\to[0,1]$ so that $\psi\circ g\circ\varphi$ is continuously differentiable. This settles question Q2. Also, it follows from Theorem 1 that the answer to question Q1 is no. In particular, if $C$ is the Cantor set, then $C$ is nowhere dense, so $\varphi^{-1}(C)$ is nowhere dense as well. But the image of $\varphi^{-1}(C)$ under the differentiable function $g\circ\varphi$ is the same as $g(C)$, which is the entire unit interval $[0,1]$. Of course, this does not address the question of whether the image of a nowhere dense set under a continuously differentiable function is always nowhere dense. The post linked to by Henno is not entirely convincing, partially because I cannot follow the proof, but mostly because the author seems to retract the proof later in the thread:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854111860906, "lm_q1q2_score": 0.8017330454261442, "lm_q2_score": 0.8267118026095991, "openwebmath_perplexity": 126.68190969727345, "openwebmath_score": 0.9273127913475037, "tags": null, "url": "http://math.stackexchange.com/questions/413072/is-the-image-of-a-nowhere-dense-closed-subset-of-0-1-under-a-differentiable" }
c#, n-tier For example: public class CreditMgr { public IEnumerable<CreditRequestInfo> GetCreditRqstInfo(String GeoID) { DataSet ds = CreditIntfDB.GetCreditRqstInfo(GeoID); return ds.ToCreditRequestInfo(); } //... }
{ "domain": "codereview.stackexchange", "id": 20462, "lm_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#, n-tier", "url": null }
ros, rosdep, rosdep-install, ros-fuerte, rosmake Originally posted by Lili Meng with karma: 286 on 2012-07-23 This answer was ACCEPTED on the original site Post score: 3 Original comments Comment by joq on 2012-07-23: This is correct. The rosmake --rosdep-install option is no longer available in Fuerte. Use an explicit rosdep install command, instead.
{ "domain": "robotics.stackexchange", "id": 10321, "lm_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, rosdep, rosdep-install, ros-fuerte, rosmake", "url": null }
cell-biology, homework, pathology, pathogenesis Title: What can thrombosis lead to? I am thinking this question. Thrombosis can result in organisation of thrombus, sepsis thromboembolism, fibrinoid swelling adiposity. I fibrinoid swelling (edema) (4) can occur. Also, I think (3) thromboembolism can occur and also (1) organisation of thrombus. What can thrombosis result in? Fibrinoid swelling involves necrosis and swelling so no. Organisation of thrombus refers to some very large space of organising thrombus in different ways - so no, since there is an exact mechanism under. Based on my interpretation of Robbins -book. The correct answer is 3. thromboembolism. Thromboembolism is a combination of thrombosis and its main complication, embolism.
{ "domain": "biology.stackexchange", "id": 2149, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-biology, homework, pathology, pathogenesis", "url": null }
matlab, estimation, linear-algebra, least-squares, parameter-estimation The filters obtained have the following coefficients (which when reversed give the impulse response): sg0 = 0.11111 0.11111 0.11111 0.11111 0.11111 0.11111 0.11111 0.11111 0.11111 sg1 = -6.6667e-02 -5.0000e-02 -3.3333e-02 -1.6667e-02 3.5832e-18 1.6667e-02 3.3333e-02 5.0000e-02 6.6667e-02 Figure 1. Savitzky–Golay (blue crosses) and Savitzky–Golay differentiation filter (red o's) coefficients, with $N=9$ and polynomial order 1. Swap the sign of the horizontal axis for impulse responses. The first filter is a moving average. The second filter has a truncated polynomial impulse response. I think such filters can be implemented recursively (see my question about that), perhaps elaborated in this pay-walled paper: T.G. Campbell, Y. Neuvo: "Predictive FIR filters with low computational complexity" IEEE Transactions on Circuits and Systems (Volume: 38, Issue: 9, Sep 1991).
{ "domain": "dsp.stackexchange", "id": 7410, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, estimation, linear-algebra, least-squares, parameter-estimation", "url": null }
quantum-mechanics, hilbert-space, angular-momentum, quantum-spin, superposition Title: Amplitude of superposition states I have a question about the following chart (for 3 and 4 particles case): What does $P_{cycl}$ mean? How's that relevant to the amplitude of superposition states and their symmetricity? The states given in your table seem to be states of a system of N spins in the $\hat{S}^z_{\text{tot}}$ and $\hat{S}^2_{\text{tot}}$ basis which are also eigenstates of the cyclic permutation operator $\hat{P}_{\text{cycl}}$ with $P_{\text{cycl}}$ being the eigenvalue of the cyclic permutation operator. An Example definition for the cyclic permutation Operator would be: $$\hat{P}_{\text{cycl}}|s_1,...,s_n>=|s_n,s_1,...,s_{n-1}>$$
{ "domain": "physics.stackexchange", "id": 71181, "lm_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, angular-momentum, quantum-spin, superposition", "url": null }
(if the independent variables are uncorrelated, it is the same as the simple Euclidean distance). Take the square root 44 σi … standard deviation of points in the cluster in the ith dimension 45. Obviously, this includes. Distance measures (analyze the proximity between objects across the variables) The Euclidean distance (or it’s square) – the most popular choice. Euclidean distance between two rows pandas. Computes cross-validated nonparametric p-values for the potential class memberships of the training data. Mahalanobis distance: Since Euclidean distance cannot ignore differences in metric indicators, the data need to be standardized before using the Euclidean distance. We can then plot the following graph. These conventional distance measures typically adopt simple principles to integrate the. Riemannian points ℝ𝐷 ℳ Motivation(2/2) [Hamm, ICML’08] [Harandi, CVPR’11] [Hamm, NIPS’08] [Pennec, IJCV’06] [Arsigny, SIAM’07] 6 Point Set model Corresponding manifold: 1. vector or matrix
{ "domain": "assaggidopera.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765604649332, "lm_q1q2_score": 0.8123406022147215, "lm_q2_score": 0.8289388083214156, "openwebmath_perplexity": 1130.1714091008055, "openwebmath_score": 0.7432230710983276, "tags": null, "url": "http://ofts.assaggidopera.it/mahalanobis-distance-vs-euclidean-distance.html" }
Yes, you have the right idea. To clarify the language slightly, you are asking if an isomorphism between $$M_1$$ and $$M_2$$ as semigroups is automatically an isomorphism as monoids. It is easy to check that a bijective semigroup (resp. monoid) homomorphism is automatically an iso, so your question is the same as this one. I will say up-front that your computation is correct, and so is your conclusion. I will also say that there is some extremely interesting mathematics lying just under the surface. If you'll indulge me, I would love to share it with you ^_^ First let's note that some bonus condition is crucial. Consider $$M_1 = M_2 = (\mathbb{Z}^2, \times)$$, with componentwise multiplication. Then the map $$f(a,b) = (a,0)$$ is easiliy seen to be a semigroup homomorphism, but $$f(1,1) = (1,0) \neq (1,1)$$ so the identity is not preserved.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9752018369215507, "lm_q1q2_score": 0.8327372798109589, "lm_q2_score": 0.8539127473751341, "openwebmath_perplexity": 213.44950483473548, "openwebmath_score": 0.8809243440628052, "tags": null, "url": "https://math.stackexchange.com/questions/3870494/let-phi-be-a-bijective-function-can-we-conclude-that-two-monoids-m-1-a/3870533#3870533" }
And then perform linear regression on $z$ as: $$y = \beta_0 1 + \beta_1 z_1 + \beta_2 z_2 + \beta_3 z_3 + \beta_4 z_4 + \epsilon$$ which is equivalent to $$y = \beta_0 1 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_1^2 + \beta_4 x_2^2 + \epsilon$$ I clearly see an improvement in both assumptions If your data shows signs of an underlying polynomial relationship between the explanatory variables, then fitting a linear regression model on polynomial variables will improve your model. As always, this comes with many advantages and disadvantages, some discussed in the posts linked below. ### An example Here is a toy example of trying to fit a linear regression model on a noisy sine curve. As you may know, the sine curve can be approximated by a sum of polynomials, so intuitively we would expect a polynomial linear regression model to do well under certain conditions: ### More details See these excellent posts for more details and explanations
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214501476359, "lm_q1q2_score": 0.8461696850856091, "lm_q2_score": 0.8774767842777551, "openwebmath_perplexity": 377.39476100626325, "openwebmath_score": 0.6187834739685059, "tags": null, "url": "https://stats.stackexchange.com/questions/352277/can-i-still-use-linear-regression-assumptions-test-on-a-linear-model-with-a-poly/352460" }
general-relativity, black-holes, spacetime, event-horizon, singularities When people try to conceptualize a singularity, they often consider the case of a point charge in classical electromagnetism, in which the electric field is given by $${\bf{E}}({\mathbf{r}}) = \frac{e}{4\pi\epsilon_0}\frac{({\mathbf{r}}-{\mathbf{r_0}})}{|{\mathbf{r}}-{\mathbf{r_0}}|^3}$$ Here the electric field diverges as $\mathbf{r}\rightarrow \mathbf{r_0}$. In this case , it's perfectly adequate to define something like "a singularity is a location where one or more components of the electric field diverges".
{ "domain": "physics.stackexchange", "id": 6604, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, black-holes, spacetime, event-horizon, singularities", "url": null }
Personally, I prefer arguments which are more geometric to arguments rooted in matrix algebra. With that in mind, here is a proof. First, two observations on the geometric meaning of an upper triangular invertible linear map. 1. Define $S_k = {\rm span} (e_1, \ldots, e_k)$, where $e_i$ the standard basis vectors. Clearly, the linear map $T$ is upper triangular if and only if $T S_k \subset S_k$. 2. If $T$ is in addition invertible, we must have the stronger relation $T S_k = S_k$. Indeed, if $T S_k$ was a strict subset of $S_k$, then $Te_1, \ldots, Te_k$ are $k$ vectors in a space of dimension strictly less than $k$, so they must be dependent: $\sum_i \alpha_i Te_i=0$ for some $\alpha_i$ not all zero. This implies that $T$ sends the nonzero vector $\sum_i \alpha_i e_i$ to zero, so $T$ is not invertible.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109507462228, "lm_q1q2_score": 0.8005206383424, "lm_q2_score": 0.8128673201042492, "openwebmath_perplexity": 167.70238724594702, "openwebmath_score": 0.933384895324707, "tags": null, "url": "https://math.stackexchange.com/questions/4841/inverse-of-an-invertible-triangular-matrix-either-upper-or-lower-is-triangular/2191497" }
energy, hydrocarbons, fuel Anyways, I was wondering why butanol would release more energy (kj/mol) than methanol? I'm guessing the same theory applies for methane vs butane? This is essentially a question concerning the trend of molecules in the same homologus series that have differing chain lengths. When we increase chain length, the number of C-C bonds increase in proportion to C-H bonds. Looking at the bond energies, the bond energy of a C-C bond is $347 kJ/mol$, while for C-H it is $414 kJ/mol$. This means to break a C-C bond compared to a C-H bond, less energy is required. Also when increasing the number of C-C bonds, while producing the same products ($CO_{2(g)} + H_2O_{(l)}$), more carbon dioxide is produced in proportion to the amount of water. The enthalpy of formation of carbon dioxide, results in it releasing more energy than that of water. Taking this into account with the lower energy requirement to break the reactants, the chain length is generally directly proportional to the energy produced.
{ "domain": "chemistry.stackexchange", "id": 14283, "lm_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, hydrocarbons, fuel", "url": null }
that $g_1$ and $g_2$ are given continuous functions that satisfy the hypothesis and $A_1$ and $A_2$ are both open (respectively closed). Let $U$ be an open set (respectively closed set) of $Y$. Then, $$f^{-1}[U] = g_1^{-1}[U]\cup g_2^{-1}[U]$$ which is a binary union of open (respectively closed) sets in $X$, hence open (closed) by continuity of $g_i$ ($i=1,2$). Hence $f$ is continuous.
{ "domain": "mathimatikoi.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773708019443872, "lm_q1q2_score": 0.838357502433327, "lm_q2_score": 0.8577681068080749, "openwebmath_perplexity": 312.6251458529912, "openwebmath_score": 0.8685490489006042, "tags": null, "url": "https://www.mathimatikoi.org/forum/viewtopic.php?f=15&t=1052&view=print" }
machine-learning, reinforcement-learning, reward Following that, you then have to decide how to add in some reward factor for the gross profit margin. There are lots of ways to do this, because the constraint you have been given is not "natural", it is something that a business owner or analyst has determined will result in overall acceptable net profit margin, which is related to but not the same as the gross profit margin goals you have been given (this is not unexpected, net profit margin is the real goal of the company, but much more complicated to figure out than gross profit margin per sale). I can think of two additional rewards that you could add in order to represent the goal of meeting the gross profit margin target:
{ "domain": "datascience.stackexchange", "id": 10139, "lm_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, reinforcement-learning, reward", "url": null }
quantum-state, entanglement, mathematics Title: How to understand combination states vs pure/mixed states? I've learned that representing a combination of two states, I simply need to take the tensor product of the states. For example: $$\left|\Psi\right>=\alpha_0\left|0\right>+\beta_0\left|1\right>$$ $$\left|\Phi\right>=\alpha_1\left|0\right>+\beta_1\left|1\right>$$ The combination state is given by: $$ \left|\Psi\right>\otimes\left|\Phi\right>=\alpha_0\alpha_1\left|00\right>+\alpha_0\beta_1\left|01\right>+\beta_0\alpha_1\left|10\right>+\beta_0\beta_1\left|11\right> $$ "Mixing" them in a classical sense can be done by simply finding their density matrices, and adding them together weighed by their probabilities respectively: $$\rho=p_1|\Psi\rangle\langle\Psi|+p_2|\Phi\rangle\langle\Phi|$$ Which gives us a mixed state.
{ "domain": "quantumcomputing.stackexchange", "id": 2944, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-state, entanglement, mathematics", "url": null }
### Show Tags 03 Jun 2011, 11:49 12 KUDOS 10 This post was BOOKMARKED MitDavidDv wrote: If two integers are chosen at random out of the set {2, 5, 7, 8}, what is the probability that their product will be of the form a^2 – b^2, where a and b are both positive integers? A: 2/3 B: 1/2 C: 1/3 D: 1/4 E: 1/6 Shalom! I am currently studying the probability chapter of the Manhattan GMAT Word Translations book. I am looking forward to the different outcomes and answers. I just used the exhaustive method. Count everything that fits. 2,5=10 2,7=14 2,8=16 5,7=35 5,8=40 7,8=56 Write down all perfect squares until 100 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 Pick one number at a time. 10 -- Keep adding with every perfect square and see whether the result is also there in the set. 10+1=11(Not there) 10+4=14(Not there) 10+9=19(Not there) 10+16=26(Not there) 10+25=35(Not there)
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551495568569, "lm_q1q2_score": 0.8498415918729684, "lm_q2_score": 0.8807970732843033, "openwebmath_perplexity": 1267.9445386601417, "openwebmath_score": 0.7334719896316528, "tags": null, "url": "https://gmatclub.com/forum/if-two-integers-are-chosen-at-random-out-of-the-set-2-5-7-8-what-114579.html" }
python, python-2.x, language-design (execout, execerr) = sp.Popen(str('python %s' % writepath).split(), stdout=sp.PIPE, stdin=sp.PIPE).communicate() if not to_write: os.remove(writepath) if execerr and execerr != '': raise RuntimeError("An issue occurred running the converted code:\n%s" % str(execerr)) print execout return output if __name__ == "__main__": token_names = None args = get_args() try: run(args.assignments, args.peoples, args.write, args.execute) except Exception as e: print "An exception has occurred:\n%s" % str(e)
{ "domain": "codereview.stackexchange", "id": 24444, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-2.x, language-design", "url": null }
python, parsing, reinventing-the-wheel, math-expression-eval pre_test_data = [ ("+ 3 4", 7), ("+ ^ 5 4 + 3 4", 632), ("+ 10a 29", 0), ("/ * 10 5 + 6 2", 6.25), ("- 10 + 7 * 2 3", -3), ("icaoscasjcs", 0), ("1038 - // * 10 5 + 7 3 2", 3), ] run_tests(eval_postfix_expr, post_test_data) print() run_tests(eval_prefix_expr, pre_test_data) if __name__ == "__main__": main() Prints: func: eval_postfix_expr, expr: '3 4 +' , result: 7 func: eval_postfix_expr, expr: '3 4 + 5 4 ^ +' , result: 632 func: eval_postfix_expr, expr: '+ 10a 29' , result: ValueError('Invalid expression.') func: eval_postfix_expr, expr: '10 5 * 6 2 + /' , result: 6.25 func: eval_postfix_expr, expr: '10 7 2 3 * + -' , result: -3 func: eval_postfix_expr, expr: 'icaoscasjcs' , result: ValueError('Invalid expression.') func: eval_postfix_expr, expr: '* 10 5 * 7 3 + // 2 -', result: ValueError('Invalid expression.')
{ "domain": "codereview.stackexchange", "id": 45453, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, parsing, reinventing-the-wheel, math-expression-eval", "url": null }
[0 1 2 3 4 5 6 7 8 9] [9 8 7 6 5 4 3 2 1 0] We can also index an array using boolean arrays: In [481]: b = a>5 print b a[b] = 0 # All elements of 'a' higher than 5 become 0 print a [False False False False False False True True True True] [0 1 2 3 4 5 0 0 0 0] ### Array and matrix multiplication¶ In [482]: print a**2 print 10*sin(np.pi/a[1:5]) # avoiding division with zero! print A*A [ 0 1 4 9 16 25 0 0 0 0] [ 1.22464680e-15 1.00000000e+01 8.66025404e+00 7.07106781e+00] [[ 1. 4. 0.09 ] [ 16. 25. 0.16 ] [ 49. 64. 83.1744]] By default, NumPy uses component-wise multiplication. For a matrix-matrix (or matrix-vector) multiplication, we use the dot function: In [483]: np.dot(A,A) Out[483]: array([[ 11.1 , 14.4 , 3.836 ], [ 26.8 , 36.2 , 6.848 ], [ 102.84 , 126.96 , 88.4744]]) ### Other basic operations¶ In [484]: A = array(A,dtype='int') print A [[1 2 0] [4 5 0] [7 8 9]]
{ "domain": "ipython.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750440288019, "lm_q1q2_score": 0.8140137118507862, "lm_q2_score": 0.8539127473751341, "openwebmath_perplexity": 3499.299033742754, "openwebmath_score": 0.29960694909095764, "tags": null, "url": "https://nbviewer.ipython.org/github/mar-one/ACM-Python-Tutorials-KAUST-2014/blob/master/Special_topics/special_topics_part2.ipynb" }
buoyancy could tell me a way to see which of my containers would displace more air? Please, I've read here too many questions of buoyancy however none of them could help me with my question. In the case of air the situation is simple. Both the open and close bottles have the same mass of air inside if the pressure is the same. In case of water the analogy fails. There would be some volume of the bottle filled with liquid due to the hydrostatic pressure of the liquid colmumn above. The pressure of the gas would increase however slightly.
{ "domain": "physics.stackexchange", "id": 55289, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "buoyancy", "url": null }
r, rna-seq Title: Step-by-Step Construction of Gene Co-expression Networks from High-Throughput Arabidopsis RNA Sequencing Data I am following the tutorial here to learn how to process raw RNA-seq data and get gene read counts. I've had no issues until I got to step 3.9, "Assignment of RNA-Seq Reads to Genes." Here, the authors run the command fc0 <- featureCounts(sam.list, annot.ext = "Ara-port11_GFF3_genes_transposons.201606.gtf", allowMultiOverlap = T, isPairedEnd = F, nthreads = 2, strandSpecific = 0, isGTFAnnotationFile = T)
{ "domain": "bioinformatics.stackexchange", "id": 2253, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, rna-seq", "url": null }
quantum-mechanics, optics, visible-light, polarization The video simply shows that light passing through polarizers behaves the way we would expect if we assume that light consists of photons; it does not provide proof that photons exist or even that light has quantum properties, because there are other, classical, explanations for the results shown. The existence of photons is proven, instead, by other experiments such as the photoelectric effect, the black-body spectrum, and detection of extremely attenuated light as individual quanta -- none of which can be explained by Maxwell's equations or other classical physics.
{ "domain": "physics.stackexchange", "id": 50432, "lm_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, optics, visible-light, polarization", "url": null }
hash-map, vb6 Public Property Get TValue() As String TValue = this.TValue End Property Public Property Let TValue(ByVal value As String) this.TValue = value End Property Public Property Get OptionStrict() As Boolean OptionStrict = this.OptionStrict End Property Public Property Let OptionStrict(ByVal value As Boolean) this.OptionStrict = value End Property Public Function ToString() As String ToString = TypeName(Me) & "<" & this.TValue & ">" End Function Public Function IsSafeBoolean(value As Variant) As Boolean On Error Resume Next IsSafeBoolean = (this.TValue = vbNullString Or this.TValue = TypeName(value)) If IsSafeBoolean Or this.OptionStrict Then Exit Function Dim result As Boolean result = CBool(value) IsSafeBoolean = (Err.Number = 0) Err.Clear On Error GoTo 0 End Function Public Function IsSafeByte(value As Variant) As Boolean On Error Resume Next
{ "domain": "codereview.stackexchange", "id": 6882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hash-map, vb6", "url": null }
c++, c++17, pointers, lazy For efficiency, InitAndGet() shouldn't copy the shared pointer, but return a reference. I'm not fond of the naming - C++ convention uses snake_case for function names. There's a lot of unnecessary this-> cluttering the code.
{ "domain": "codereview.stackexchange", "id": 40535, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++17, pointers, lazy", "url": null }
\pi i z}$ and recall the complex exponential representation of the sine function. This yields \begin{align} n = \lim_{z \to 0} \frac{\sin n \pi z}{\sin z } = (2 i)^{n-1} \lim_{z \to 0} \ \ \prod_{k = 1}^{n-1} \sin( \pi z + \tfrac{2 \pi k }{n} ) = (2 i)^{n-1} \prod_{k = 1}^{n-1} \sin( \tfrac{2 \pi k }{n} ). \end{align}
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9902915232319999, "lm_q1q2_score": 0.8336528084072325, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 297.7152924377522, "openwebmath_score": 0.9880052208900452, "tags": null, "url": "https://math.stackexchange.com/questions/70231/how-to-prove-those-curious-identities" }
how different angles of an inclined plane affect the easiness to pull up an object. You can break the weight of the object down into components that are parallel to and perpendicular to the plane. Lower and raise the ramp to see how the angle of inclination affects the parallel forces. whereh is the vertical distance to the centroid. The Vanishing point for the box itself. The plane is at an angle of 30 ° to the horizontal, as shown in the figure above. , it does not roll or topple. You can also change the mass of the block and the gravitational field strength. 7091 seconds. Friction is always parallel to the surface. A body is projected up along an inclined plane from the bottom with speed V 1. T is parallel to. The catch is released and the object. Inclined Plane - Angle and Components; The Four Second Inclined Plane Joyride; Inclined planes come in many shapes and sizes. A body of mass 4kg is on the point of slipping down a plane. A block initially at rest, then accelerated upward
{ "domain": "farmaciacoverciano.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983342958526322, "lm_q1q2_score": 0.8215668551893897, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 396.8773525954262, "openwebmath_score": 0.5151293873786926, "tags": null, "url": "http://farmaciacoverciano.it/mnmj/inclined-plane-angle.html" }
energy-conservation, inertial-frames Title: Work done by Friction Force in a different reference frame Assume a block has an initial speed v0. With a friction force, it stops after moving a distanced d. I want to examine the work-energy theorem, or conservation of total energy in 2 reference frames: (i) Ground (ii) an inertial reference frame S moving with speed v0/2. From the ground point of view: -F * d = 0 - 1/2m * v02. Or, if studying the entire system (and treat the friction as internal force): 1/2m * v02 + Q = 0, where Q is the dissipated energy. From the reference frame S point of view, the object moves right with an initial speed v0/2 and moves back to the original location with speed -v0/2. So work done by the friction is 0, and change of kinetic energy is 0, which is consistent, in terms of work-energy theorem. But from total energy point of view, Q = 0.
{ "domain": "physics.stackexchange", "id": 93519, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy-conservation, inertial-frames", "url": null }
Now what? Ok that's that formula that I did use. I differentiated and substitued t = 1/30 h into the equation and found that dD/dt = -55 km/h.. so I was wondering if my answer was correct 5. So you have the distance in terms of two functions in t and you can plug those functions of t into your distance formula, then you derive it and plug in the value of 2 mins. (keep in mind that your rate is in hours and your t value is in minutes so I converted 90 km/h to 3/2 km/min by dividing by 60 and similarly converting 80km/h to 4/3 km/min. I guess and easier approach would be to plug in before deriving so you have: distance = $\sqrt{\left( 5\; -\; \frac{3}{2}t \right)^{2}\; +\; \left( 5\; -\; \frac{4}{3}t \right)^{2}\; }$ then simplifying you get: distance = $\sqrt{\frac{145}{36}t^{2}\; -\; \frac{85}{3}t\; +\; 50\; }$
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147169737826, "lm_q1q2_score": 0.8165696763076353, "lm_q2_score": 0.8397339756938819, "openwebmath_perplexity": 601.1536442010657, "openwebmath_score": 0.6779726147651672, "tags": null, "url": "http://mathhelpforum.com/calculus/133525-related-rates.html" }
vba, mvp Title: Simple MVP Name-Finder I've recently learnt about the Model-View-Presenter architectural pattern and I wanted to give it a go with a simple VBA project. The aim is to retrieve a person's name from a UserForm. The userform looks like this: A user should select a team, which updates the name field > Select a name belonging to that team > Hit OK. The control names are: TeamSelect NameSelect OkButton CloseButton I'm particularly interested in feedback on my implementation of MVP (or lack of!) ... So here is the code: GetName Sub - Standard Module: Macros Public Sub GetName() With New NamePresenter .Present End With End Sub Model - Class Module: NameModel Private Type TNameView Team As String Name As String End Type Private this As TNameView Public Property Get Team() As String Team = this.Team End Property Public Property Let Team(ByVal value As String) this.Team = value End Property
{ "domain": "codereview.stackexchange", "id": 32225, "lm_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, mvp", "url": null }
EITHER using a list of relevant powers of 12: 1, 12, 144     (M1) $$1071 = 7 \times {12^2} + 5 \times {12^1} + 3 \times {12^0}$$     (A1) OR attempted repeated division by 12     (M1) $$1071 \div 12 = 89{\text{rem}}3;{\text{ }}89 \div 12 = 7{\text{rem}}5$$     (A1) THEN $$1071 = {753_{12}}$$     A1 [3 marks] a. $$1071 = 3 \times 3 \times 7 \times 17$$     A1 [1 mark] b. in base $$b$$ $$a060$$ ends in a zero and so $$b$$ is a factor of 1071     R1 from part (a) $$b < 12$$ as $$a060$$ has four digits and so the possibilities are $$b = 3,{\text{ }}b = 7$$ or $$b = 9$$     R1 stating valid reasons to exclude both $$b = 3$$ eg, there is a digit of 6 and $$b = 9$$ eg, $$1071 = {(1420)_9}$$     R1 $$b = 7$$     A1 Note:     The A mark is independent of the R marks. [4 marks] c.i. $$1071 = {(3060)_7} \Rightarrow a = 3$$     A1 [1 mark] c.ii. [N/A] a. [N/A] b. [N/A] c.i. [N/A] c.ii.
{ "domain": "iitianacademy.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419674366167, "lm_q1q2_score": 0.8037973178354316, "lm_q2_score": 0.8128673178375734, "openwebmath_perplexity": 2846.0933988708794, "openwebmath_score": 0.8445948958396912, "tags": null, "url": "https://www.iitianacademy.com/ib-dp-maths-topic-10-5-representation-of-integers-in-different-bases-hl-paper-3/" }
fl.formal-languages My impression is that neither is an obvious characteristic of CS languages. I am no expert on this, and you should not trust me too much, but there does not seem to be structural organisation that can be associated to all CSL, like parse-trees can be associated to strings of CFL, or like regular expressions, even though many closure properties are known for CSL (which are AFLs). Also, the associated automaton, the LBA, is not the most obvious computing device to use as it is non deterministic, and probably too powerful to be simulated efficiently in specific application. But I insist this is just informal intuition, not hard facts. The fact is that many problems, like CF and regular languages, do not need the full power of CSL and can be better dealt with more specialized formalism, computationally easier to use, and expressing more closely the problem at hand. A typical example is in natural language processing. There are
{ "domain": "cstheory.stackexchange", "id": 2742, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fl.formal-languages", "url": null }
acoustics, electrical-resistance, aerodynamics, air Now it might sound that, given enough margin between flight speed and the speed of sound, drag will be equal for equal lift. But that is not true - remember how speed and pressure changes due to a moving body in supersonic flow are the opposite of those in subsonic flow? Whereas in subsonic flow there is lower pressure at the forward-facing parts of the body (except for the region around the stagnation point) and higher pressure on the rear-facing parts (except for the region of separated flow on blunt bodies), in supersonic flow it is the reverse. Any inclination of the body surface to the direction of movement will be punished by additional pressure drag which works opposite to how it helps to reduce drag in subsonic flow. This is called wave drag and will make any body except for a totally aligned flat plate create more drag in supersonic flow than it does in subsonic flow.
{ "domain": "physics.stackexchange", "id": 56474, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acoustics, electrical-resistance, aerodynamics, air", "url": null }