text
stringlengths
1
1.11k
source
dict
optics, photons These effects need strongly nonlinear materials and/or very high intensities to be significant so they are not usually witnessed in everyday's life. However, one example would be those fancy green laser pointers. In them, there is a small laser producing infrared light which is then frequency doubled in a non-linear crystal, producing green visible light. The infrared laser is pulsed so that for the same average power, the electric field can reach much higher (peak) intensities, enhancing the non-linear effects greatly. Amazing technology at a few bucks' cost! P.S. I simplified things a bit too much, so to clear things up: Individual atomic dipoles can't pick up a second order non-linear polarisation (for symmetry reasons). In that case, it can be the result of dipoles formed by ions in some asymmetric crystals.
{ "domain": "physics.stackexchange", "id": 6602, "lm_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, photons", "url": null }
integral—one with upper and lower limits—that goes to infinity in one direction or another. Evaluate the improper integral $$\int_0^\infty\frac{-38x}{(2x^2+9)(3x^2+4)} dx$$ I thought about doing this through partial fractions decomposition. Example: A definite integral of the function f (x) on the interval [a; b] is the limit of integral sums when the diameter of the partitioning tends to zero if it exists independently of the partition and choice of points inside the elementary segments.. Improper integrals Calculator online with solution and steps. Evaluating an improper integral is a three-step process: Express the improper integral as the limit of a proper integral. Besides math integral, covariance is defined in the same way. (A vertical asymptote […] We will walk through five examples of Improper Integrals and see how we change our integral into a limit expression, which enables us to approach infinity and determine convergence and divergence. Evaluate the […] This can happen in
{ "domain": "loveourlula.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9603611654370414, "lm_q1q2_score": 0.8200646412507298, "lm_q2_score": 0.8539127473751341, "openwebmath_perplexity": 514.4997292402578, "openwebmath_score": 0.9548237919807434, "tags": null, "url": "http://loveourlula.com/aliya-mustafina-gamm/b9cec7-improper-integral-calculator" }
c++, c++11, template-meta-programming template<typename TypeList, typename T> struct type_list_contains; // forward declaration template<bool Same, typename TypeList, typename T> struct type_list_contains_helper { static const constexpr bool value = type_list_contains<typename TypeList::next, T>::value; }; template<typename TypeList, typename T> struct type_list_contains_helper<true, TypeList, T> { static const constexpr bool value = true; }; template<typename TypeList, typename T> struct type_list_contains { static const constexpr bool value = typename type_list_contains_helper<std::is_same<typename TypeList::current, T>::value, TypeList, T>::value; }; template<typename T> struct type_list_contains<type_list_end, T> { static const constexpr bool value = false; };
{ "domain": "codereview.stackexchange", "id": 26918, "lm_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, template-meta-programming", "url": null }
javascript, ecmascript-6, vue.js Spacing between player squares and labels It would be wise to add some spacing between the squares and the player labels: JavaScript / VueJS use const as default It is wise to use const for declaring variables to avoid accidental re-assignment (e.g. colorsToAssign in scrambleTeam1Colors() and scrambleTeam2Colors(). Then when re-assignment is deemed necessary use let - e.g. positionsToAssign in scrambleTeams. Setting up data The values setup in data are a bit redundant. A for loop could be used for that: data() { const data = { players: [], colors }; for (let i = 1; i <= 10; i++) { data.players.push({ id: i + 1, name: "Player " + i, color: colors[(i - 1) % 5], position: i - 1 }); } return data; }, where colors is moved out above the export default statement. This allows the players section of computed to be removed completely. spreading items into an array Instead of calling Array.from() - e.g.
{ "domain": "codereview.stackexchange", "id": 39130, "lm_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, ecmascript-6, vue.js", "url": null }
java, performance, strings, regex, android private static String fastSubtitle(String para) { if (para.contains("[Subtitle:")) { try { return para.substring(para.indexOf("[Subtitle:") + 10, para.indexOf("]", para.indexOf("Subtitle:"))); } catch (StringIndexOutOfBoundsException ex) { try { return para.substring(para.indexOf("[Language:") + 10, para.indexOf("[") - 1); } catch (StringIndexOutOfBoundsException ey) { return para.substring(para.indexOf("[Language:") + 10, para.length() - 1); } } } return ""; } I am aware that I could use an if statements in the subtitle method but this does the job.
{ "domain": "codereview.stackexchange", "id": 36979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, strings, regex, android", "url": null }
java, algorithm, strings Or (even better) we can use the Parameterized Junit runner : @RunWith(Parameterized.class) public class StringMatchersTest { @Parameterized.Parameters public static List<Object[]> getParameters() { return asList( new Object[]{ StringMatchers.knuthMorrisPrattMatcher() }, new Object[]{ StringMatchers.automatonMatcher() }, new Object[]{ StringMatchers.rabinKarpMatcher() }, new Object[]{ StringMatchers.zMatcher() } ); } private final StringMatcher matcher; public StringMatchersTest(StringMatcher matcher) { this.matcher = matcher; } @Test public void testMatcher() { ... } }
{ "domain": "codereview.stackexchange", "id": 16631, "lm_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, algorithm, strings", "url": null }
# loglog Log-log scale plot ## Syntax ``loglog(X,Y)`` ``loglog(X,Y,LineSpec)`` ``loglog(X1,Y1,...,Xn,Yn)`` ``loglog(X1,Y1,LineSpec1,...,Xn,Yn,LineSpecn)`` ``loglog(Y)`` ``loglog(Y,LineSpec)`` ``loglog(___,Name,Value)`` ``loglog(ax,___)`` ``lineobj = loglog(___)`` ## Description example ````loglog(X,Y)` plots x- and y-coordinates using logarithmic scales on the x-axis and the y-axis. To plot a set of coordinates connected by line segments, specify `X` and `Y` as vectors of the same length.To plot multiple sets of coordinates on the same set of axes, specify at least one of `X` or `Y` as a matrix. ``` example ````loglog(X,Y,LineSpec)` creates the plot using the specified line style, marker, and color.``` example ````loglog(X1,Y1,...,Xn,Yn)` plots multiple pairs of x- and y-coordinates on the same set of axes. Use this syntax as an alternative to specifying coordinates as matrices.``` example
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357591818725, "lm_q1q2_score": 0.8200598927393812, "lm_q2_score": 0.8376199592797929, "openwebmath_perplexity": 1285.5666122084417, "openwebmath_score": 0.7196917533874512, "tags": null, "url": "https://www.mathworks.com/help/matlab/ref/loglog.html" }
ros, ikfast Originally posted by vinjk on ROS Answers with karma: 96 on 2015-09-05 Post score: 0 Original comments Comment by gvdhoorn on 2015-09-06: As this is purely an OpenRave/IKFast question, I think you'd better ask this on openrave-users (which I believe you already found). As to your code: it is really old (2012), so it might be that in newer versions it has changed. Comment by vinjk on 2015-09-06: Hi gvdhoorn, I posted the question here because this code was given in ROS wiki http://wiki.ros.org/Industrial/Tutorials/Create_a_Fast_IK_Solution#Testing_output_from_IKFast Do you know where I can find the latest version? Comment by gvdhoorn on 2015-09-06: That still doesn't make it a ROS problem. All that code was generated by OpenRave scripts, not ROS. Do you know where I can find the latest version?
{ "domain": "robotics.stackexchange", "id": 22571, "lm_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, ikfast", "url": null }
c#, sorting But it seems very verbose and I'd love to make it shorter (also, as it's my first iComparer, if I made a mistake/nonsense/whatever, don't hesitate to tell me!) Example: Let's take A, A1, A2, B & C as : A is a BubblueGraphUIControl A1 is a BubblueGraphUIControl A2 is a BubblueGraphUIControl C is a LineGraphUIControl B is a StackedGraphUIControl I put it in the list named myList in random mode. When I do myList.Sort(new GraphUIControlComparer()) I want myList to be in the order A, A1, A2, C, B because of the types order following this rule: BubbleGraphUIControl BatchGraphUIControl LineGraphUIControl StackedGraphUIControl
{ "domain": "codereview.stackexchange", "id": 12856, "lm_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#, sorting", "url": null }
python, algorithm, coordinate-system def getCoordinate(Country, interval): ne_lng = Country['ne_lng'] ne_lat = Country['ne_lat'] sw_lng = Country['sw_lng'] sw_lat = Country['sw_lat'] interval = float(interval) i = 0 temp = ne_lng lngList = [] n = int((ne_lng - sw_lng)/interval)+1 for _ in range(n): i += 1 lngList.append(temp) temp -= (ne_lng - sw_lng) / n i = 0 temp = ne_lat latList = [] n = int((ne_lng - sw_lng)/interval)+1 for _ in range(n): i += 1 latList.append(temp) temp -= (ne_lat - sw_lat) / n coordinate = [] for ki, vi in enumerate(lngList): for kj, vj in enumerate(latList): if ki == n-1 or kj == n-1: pass else: coordinate.append([vi, vj, lngList[ki+1], latList[kj+1]]) newList = [] for host in coordinate: newDict = { 'ne_lng': host[0], 'ne_lat': host[1], 'sw_lng': host[2],
{ "domain": "codereview.stackexchange", "id": 24769, "lm_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, algorithm, coordinate-system", "url": null }
linear-systems, causality Title: Causal LTI system having exponential input I know that for an LTI system having complex exponential input, i.e, $x(t)=\exp(j w_o t)$ & $h(t) \to $ LTI System ; then, its output { $y(t) \} =M \exp(j w_o t + \phi)$ , where $M= |H(j w)|_{|w= w_o}$ & $\phi = \angle \{ H(j w)\} _{|w= w_o}$ But for a causal LTI system having exponential input, i.e, $x(t)=\exp(a t)$ & $h(t) \to $ Causal LTI System ; Is it true to say its output $\{ y(t)\}$ is given by: $y(t) =K \exp(a t )$ , where $K= H(s)_{|s=a} \quad$ ? Any LTI system with transfer function $H(s)$ reacts to an input signal $x(t)=e^{s_0t}$ with an output signal $y(t)=H(s_0)e^{s_0t}$, if $s_0$ is inside the region of convergence (ROC) of $H(s)$. This is equivalent to saying that the functions $e^{s_0t}$ are eigenfunctions of LTI systems, and $H(s_0)$ is the corresponding eigenvalue.
{ "domain": "dsp.stackexchange", "id": 7254, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "linear-systems, causality", "url": null }
quantum-field-theory, special-relativity, hilbert-space, operators, invariants Title: Srednicki's QFT: Why $\langle p|\phi(0)|0\rangle$ in the interacting theory is Lorentz invariant? I am reading Srednicki's QFT and I have met a problem. In its section 5, (5.18) , after deducing the LSZ formula, in order to check whether his supposition "that the creation operators of free field theory would work comparably in the interacting theory" is reasonable, the author considered the number
{ "domain": "physics.stackexchange", "id": 89479, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, special-relativity, hilbert-space, operators, invariants", "url": null }
### Question 8.36 Do you know a Lie group that has no faithful finite-dimensional representations? ### Question 8.37 What do you know about representations of $${\operatorname{SO}}(2)$$? $${\operatorname{SO}}(3)$$? ## Categories and Functors ### Question 9.1 Which is the connection between Hom and tensor product? What is this called in representation theory? ### Question 9.2 Can you get a long exact sequence from a short exact sequence of abelian groups together with another abelian group? ### Question 9.3 Do you know what the Ext functor of an abelian group is? Do you know where it appears? What is $$\operatorname{Ext} ({\mathbb{Z}}/m{\mathbb{Z}}, {\mathbb{Z}}/n{\mathbb{Z}})$$? What is $$\operatorname{Ext} ({\mathbb{Z}}/m{\mathbb{Z}}, {\mathbb{Z}})$$? #1 #2 #6 #3 #4 #5 #7 #8 #9 #10
{ "domain": "dzackgarza.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9908743636887527, "lm_q1q2_score": 0.8030827774478073, "lm_q2_score": 0.8104789132480439, "openwebmath_perplexity": 362.4303021135475, "openwebmath_score": 0.9997151494026184, "tags": null, "url": "https://quals.dzackgarza.com/10_Algebra/TexDocs/QualAlgebra_stripped.html" }
c#, beginner, parsing, xml /// <summary> /// Builds the treeview of the user's XML file /// </summary> /// <param name="szPbcFilePath">XML Filename</param> public void buildTree(String szPbcFilePath) { XmlDataDocument xmldoc = new XmlDataDocument(); XmlNode xmlnode; FileStream fs = new FileStream(szPbcFilePath, FileMode.Open, FileAccess.Read); xmldoc.Load(fs); xmlnode = xmldoc.ChildNodes[1]; treeView.Nodes.Clear(); treeView.Nodes.Add(new TreeNode(xmldoc.DocumentElement.Name)); TreeNode tNode; tNode = treeView.Nodes[0]; AddNode(xmlnode, tNode); }
{ "domain": "codereview.stackexchange", "id": 8380, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner, parsing, xml", "url": null }
c#, jquery, asp.net-mvc, async-await, rss BlogFeed.cshtml @model IEnumerable<System.ServiceModel.Syndication.SyndicationItem> @if (Model == null) { <p class="alert alert-danger">Aww snap! We couldn't retrieve the RSS Feed!</p> } else { foreach (var post in Model) { <div class="row feedSnippet col-md-12"> <h4> <!--Id is the permalink--> <a href="@post.Id" target="_blank">@post.Title.Text</a> <small>@post.PublishDate.Date.ToLongDateString()</small> </h4> <p>@Html.Raw(post.Summary.Text)</p> </div> } } HomeController.cs using System; using System.Collections.Generic; using System.Net.Http; using System.ServiceModel.Syndication; using System.Threading.Tasks; using System.Web.Mvc; using System.Xml; namespace RubberduckWeb.Controllers { public class HomeController : Controller { public ActionResult Index() { return View(); }
{ "domain": "codereview.stackexchange", "id": 18026, "lm_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#, jquery, asp.net-mvc, async-await, rss", "url": null }
complexity-theory, complexity-classes, oracle-machines If this is not PSPACE hard, would it fit somewhere in PH? The problem is $PH$-hard because $QSAT_i$ is $\Sigma_{i+1}$-complete for every $i$ and we have $i \in O(\log n)$ for all constant $i$.
{ "domain": "cs.stackexchange", "id": 20863, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, complexity-classes, oracle-machines", "url": null }
precipitation, drought, data-analysis If the mean of the distribution is zero, then by the central limit theorem, you would expect that the limit of your sample mean (the mean of ~40 years of data) would approach zero as your sample got larger. So yes, it is both possible and expected. What may be causing your confusion is that SPI can be calculated for different time sets. If you are analyzing month by month, then I would assume that your dataset is divided by month. In that case, the SPI is calculated individually for each month, so that the mean of any month or set of months over many years would tend to zero, as per the last paragraph.
{ "domain": "earthscience.stackexchange", "id": 930, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "precipitation, drought, data-analysis", "url": null }
c#, python, performance, io, compression Title: Python 3 decompression routine 10x slower than C# equivalent I'm relatively new to Python 3, especially IO programming, writing a Blender add-on to import model data. The model data is available in a custom compression, and I originally wrote code in C# to decompress it in memory, porting it to Python 3. However, being a little unsure about the "optimal" usage of IO classes and functions in Python, I got a little speed problem. The code runs 10 times slower in Python compared to the C# equivalent, and I don't find any more optimization potential, because of my limited Python knowledge. A test yielded the following speed results at decompressing the same file (around 50 megabytes of data): C#: ~4-5 seconds Python: ~43 seconds
{ "domain": "codereview.stackexchange", "id": 20098, "lm_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#, python, performance, io, compression", "url": null }
matlab, filters, filter-design end if (Rp <= 0) | (As < 0) error('PB ripple and/or SB attenuation ust be larger than 0') end N = ceil((log10((10^(Rp/10)-1)/(10^(As/10)-1)))/(2*log10(Wp/Ws))); fprintf('\n*** Butterworth Filter Order = %2.0f \n',N) OmegaC = Wp/((10^(Rp/10)-1)^(1/(2*N))); [b,a]=u_buttap(N,OmegaC); function [b,a] = u_buttap(N,Omegac); % Unnormalized Butterworth Analog Lowpass Filter Prototype % -------------------------------------------------------- % [b,a] = u_buttap(N,Omegac); % b = numerator polynomial coefficients of Ha(s) % a = denominator polynomial coefficients of Ha(s) % N = Order of the Butterworth Filter % Omegac = Cutoff frequency in radians/sec % [z,p,k] = buttap(N); p = p*Omegac; k = k*Omegac^N; B = real(poly(z)); b0 = k; b = k*B; a = real(poly(p));
{ "domain": "dsp.stackexchange", "id": 9136, "lm_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, filters, filter-design", "url": null }
bash, console I've transformed some of the other if and else above into early returns, to reduce the nesting depth - I find that easier to read. Also, I've capitalised N in the prompt, to provide the usual indication of the default. And we know that $REPLY is a single character, so we can lose the anchors. Let cd do its own checking instead There's a possible race between checking for the existence of a directory and actually changing into it, so it's easier and safer to simply check whether cd succeeded: command cd "$@" && test -d 'venv' && funcCheckVirtualEnvironment This also allows cd to produce the error message (in the user's preferred $LANGuage). Consider the exit status of the command If we cd but there's no venv directory at the destination, that should be considered a success: command cd "$@" || return $? if test -d "venv" then funcCheckVirtualEnvironment else true fi
{ "domain": "codereview.stackexchange", "id": 29925, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bash, console", "url": null }
Mahalanobis distance is given by the following. (Who is one? If the parameters are given, Mahalanobis distance is Chi-square distributed, and this knowledge can be used to identify outliers. Then you multiply the 1×3 intermediate result by the 3×1 transpose (-2, 40, 4) to get the squared 1×1 Mahalanobis Distance result = 28.4573. In, Yeah, thought so. Featured on Meta New Feature: Table Support. Covariance matrix of group % @author: Kardi Teknomo Spreadsheet example (MS Excel) of this Mahalanobis computation can be is computed using centered data matrix, It produces covariance matrices for group 1 and 2 as follow, The pooled covariance matrix of the two groups is computed as weighted average of the covariance matrices. Using Mahalanobis Distance to Find Outliers. Thanks for contributing an answer to Stack Overflow! Nice explanation. [n1, k1]=size(A); The result obtained in the example using Excel is Mahalanobis(g1, g2) = 1.4104. Commented: Akira Agata on 3 Mar 2019 Accepted Answer:
{ "domain": "dobrewiadomosci.eu", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105287006255, "lm_q1q2_score": 0.8177771892521221, "lm_q2_score": 0.8376199633332891, "openwebmath_perplexity": 1350.5458421304695, "openwebmath_score": 0.5691320896148682, "tags": null, "url": "https://dobrewiadomosci.eu/professional-ice-eggwr/ded191-mahalanobis-distance-excel" }
odd which is 9, the median would lie on 5th position which is … a) Complete the frequency table for this information. PC ATX12VO (12V only) standard - Why does everybody say it has higher efficiency? Problem. Reading from the graph, the lower quartile is 38. So the interquartile range is 38 - 15 = 23. The lower quartile $Q_1$is the point such that the area up to $Q_1$is one quarter of the total area. The median or Q1 will be in the first class whose cumulative frequency includes their number. Median, which is middle quartile tells us the center point and upper and lower quartiles tell us the spread. The IQR can be calculated by subtracting the lower quartile from the upper. To do the lower quartile, the same applies, you just need to half the median, so you'd go to 20 on the y-axis. On box plot, how many quartiles can we see? You can use many of the other features of the quantile function which we described in our guide on how to calculate percentile in R.. The result is 811.5. Finding
{ "domain": "pipburner.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813501370537, "lm_q1q2_score": 0.8710708070888212, "lm_q2_score": 0.9111797075998823, "openwebmath_perplexity": 691.1884279624694, "openwebmath_score": 0.4373709261417389, "tags": null, "url": "https://pipburner.com/rajgir-mla-unngu/2ca157-j-b-weld-plastic-putty" }
ros, kinect, libopencv, depth I am thinking of then converting image_color via this (part 1.5) method to a cv::Mat format. I would be very grateful if anyone would say if I'm thinking in the right direction. Thank you in advance. Originally posted by niosus on ROS Answers with karma: 386 on 2012-04-26 Post score: 0 Original comments Comment by joq on 2012-04-26: You should probably record the corresponding /camera/*/camera_info topics, too. They contain useful calibration information. I don't know what kind of processing you're doing, but you might look into the pcl library. The kinect also publishes some point cloud topics, some of which I think have the spatial information and the color for each point grouped together. You can look at them in rviz. Just add a pointcloud2 and subscribe to one of the topics (say, /camera/rgb/points). Displaying them as points with Color Transformer RGB8 shows you the color info too.
{ "domain": "robotics.stackexchange", "id": 9142, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, kinect, libopencv, depth", "url": null }
javascript, jquery, animation When animating any DOM content don't use setInterval or setTimeout. Thay have a long list of problems in terms of creating good quality animation. Use requestAnimationFrame as it is synced to the display hardware and will ensure the best possible frame rate 60fps and will always be in perfect sync with the display refresh. (see example code for how to use)
{ "domain": "codereview.stackexchange", "id": 32766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, animation", "url": null }
java, security, cryptography /** * Decrypts the given content with the given passphrase and configured cipher. * @param content Content to be decrypted. * @return Decrypted byte array. */ private byte[] decrypt(byte[] content) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchProviderException, InvalidAlgorithmParameterException { return performCrypto(content, Cipher.DECRYPT_MODE); }
{ "domain": "codereview.stackexchange", "id": 2702, "lm_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, security, cryptography", "url": null }
javascript, mathematics // -- My custom test case -- // console.log("Input: (2, 5, 2, 5), Output: " + findClosest(2, 5, 2, 5)); // -1 Now for my next approach Everything you have seen above remains the same, but now I don't calculate the offsets. Instead I calculate the total number of elements. Since I have my forwards variable set to my absolute difference... It is actually the length of my line segment from 2 to 5 on my number scale. Then I can just subtract this segment from number scale to get the reverse distance 1-2-3-4-5-6-7-8 | | |~~3~~| |~seg~| 1-2-3-4-5-6-7-8 |~~~~~~8~~~~~~| |~ num-scale ~| seg - num-scale |~|~ 5 ~|~~~~~| Everything else remains the same... Hence here is the code (Yes, I also made this code to be series extensible):
{ "domain": "codereview.stackexchange", "id": 42193, "lm_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, mathematics", "url": null }
quantum-field-theory, group-theory, representation-theory Title: What does matrices act on different spaces mean in QFT? I have a Dirac kinetic term in a Lagrangian. $$ i\bar{\psi}\gamma^\mu D_\mu\psi = i\bar{\psi}\gamma^\mu\partial_\mu\psi + g\bar{\psi}\gamma^\mu\psi A^a_\mu T^a,$$ However, I usually heard that people say that: $\gamma_{\mu}$ and $T^a$ are both matrices, but they act in different spaces and are not multiplied with each other as matrices. They therefore commute with each other.
{ "domain": "physics.stackexchange", "id": 57667, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, group-theory, representation-theory", "url": null }
neural-networks, regression Title: Best way to measure regression accuracy? I'm asking because classification problems have very concrete metrics like accuracy that are totally transparent to understand. Whereas regression models seem to have a very large number of possible evaluation strategies and to me at least it is not clear which (if any) of them is as reliable/interpretable as accuracy is in classification problems. Possible Candidates:
{ "domain": "ai.stackexchange", "id": 3078, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, regression", "url": null }
radiation, radioactivity Electrons and positrons are not remotely useful in inducing fission, which would be required to convert lead (atomic number 82) to gold (atomic number 79). Inducing beta decay in lead would also lead in the wrong direction, since converting an neutron to a proton increases the atomic number of a nucleus, rather than decreasing it. ETA: I misspoke - that is, I was wrong about the details of $\beta$ + decay. Such a process will decrease atomic number by one, so inducing 3 successive instances of $\beta$ + decay would (in theory) produce gold. For about a microsecond. Lead occurs in 3 isotopes, 206Pb, 207Pb, and 208Pb. A $\beta$ + decay will convert these to thallium, specifically, 206Tl, 207Tl and 208Tl. Each of these isotopes will decay via $\beta$ - decay back to lead with half-lives of 3-4 minutes. But let's say we can induce further $\beta$ + decay and convert the thallium to mercury before the atoms have a chance to decay.
{ "domain": "physics.stackexchange", "id": 25168, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "radiation, radioactivity", "url": null }
# Real definition of “countable set” Is there any correct definition for countable set? I read some book saying a set is countable if there is a bijection between it and the set of all natural numbers, while some other text says if there is an injection into the set of all natural numbers. I really am uncertain which definition is correct.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290955604489, "lm_q1q2_score": 0.8234861566611618, "lm_q2_score": 0.8479677526147223, "openwebmath_perplexity": 341.97797237191105, "openwebmath_score": 0.8717333674430847, "tags": null, "url": "https://math.stackexchange.com/questions/345716/real-definition-of-countable-set" }
functional-programming, postscript % <array/string> <proc> map <new array/string> /map { 4 dict begin
{ "domain": "codereview.stackexchange", "id": 38034, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "functional-programming, postscript", "url": null }
electromagnetism, lagrangian-formalism, field-theory, gauge-theory Let $\Psi : \mathbb R^3\mapsto \mathbb C^n$ be an $n$-component wavefunction. We choose a basis $\{\hat e_1,\hat e_2,\ldots,\hat e_n\}$ for $\mathbb C^n$ and express our wavefunction in component form $\Psi = \psi^a \hat e_a$. If we allow the basis to be position-dependent, then differentiation of the wavefunction yields $$\partial_{\color{red}{\mu}} \Psi = (\partial_\color{red}{\mu} \psi^a)\hat e_a + \psi^a\partial_\color{red}{\mu}(\hat e_a)$$ where I use the red, Greek subscript to denote the spatial index and Latin super/subscripts to denote the $\mathbb C^n$ indices. The expression $\partial_\color{red}{\mu}(\hat e_a)$ will be some element of $\mathbb C^n$, so we can express it in the local basis as $\partial_\color{red}{\mu}(\hat e_a) = {A_\color{red}{\mu}}^b_{\ \ a} \hat e_b$. Plugging this back in and relabeling indices yields $$\partial_\color{red}{\mu} \Psi = (\partial_\color{red}{\mu} \psi^a + {A_\color{red}{\mu}}^a_{\ \ b} \psi^b)\hat e_a$$
{ "domain": "physics.stackexchange", "id": 74435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, lagrangian-formalism, field-theory, gauge-theory", "url": null }
c#, unit-testing, meta-programming, rubberduck var codePaneFactory = new CodePaneWrapperFactory(); var mockHost = new Mock<IHostApplication>(); mockHost.SetupAllProperties(); var parser = new RubberduckParser(vbe.Object, new RubberduckParserState()); parser.State.StateChanged += State_StateChanged; parser.State.OnParseRequested(); _semaphore.Wait(); parser.State.StateChanged -= State_StateChanged; var qualifiedSelection = new QualifiedSelection(new QualifiedModuleName(component), selection); var module1 = project.Object.VBComponents.Item(0).CodeModule; var module2 = project.Object.VBComponents.Item(1).CodeModule; var module3 = project.Object.VBComponents.Item(2).CodeModule; var messageBox = new Mock<IMessageBox>(); messageBox.Setup(m => m.Show(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<MessageBoxButtons>(), It.IsAny<MessageBoxIcon>())) .Returns(DialogResult.OK);
{ "domain": "codereview.stackexchange", "id": 18250, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, unit-testing, meta-programming, rubberduck", "url": null }
classical-mechanics, acoustics, frequency, resonance To simplify a little bit this complex problem let's forget conditions like air temperature, pressure and humidity. I'm more interrested in second approach, to create a tool that works a little bit like fuild mechanics simulation software, that help for example design heating installations etc cetera, except that this tool would be usefull for acoustic installations, architecture or instrument design. If anyone could share some knowledge usefull to understand this phenomena I would be greatfull. What I have found in school and university books or wikipedia is not enough, or I'm not searching for right words. Your two proposed approaches are the ones usually followed by researchers in acoustics. There is a third one that would be an experimental approach. For example you could place a microphone inside the tube and move it to a large number of positions to construct a sound pressure map.
{ "domain": "physics.stackexchange", "id": 17437, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, acoustics, frequency, resonance", "url": null }
homework-and-exercises, scattering \mathcal{A} \left[1 - 2\cos\phi + \cos^2\phi \right] + \cos^2 \phi - 1 &= 0\\ \mathcal{A} - 2\mathcal{A} \cos\phi + \mathcal{A}\cos^2\phi + \cos^2 \phi - 1 &= 0\\ (\mathcal{A}+1)\cos^2\phi - 2\mathcal{A} \cos\phi + (\mathcal{A} - 1) &= 0\leftarrow \substack{\text{in the end i get the quadratic equation}\\\text{which has a cosinus.}} \end{align} Is it possible to continue by solving this quadratic equation as a regular quadratic equation using the "completing the square method"? I mean like this: \begin{align} \underbrace{(\mathcal{A}+1)}_{\equiv A}\cos^2\phi + \underbrace{-2\mathcal{A}}_{\equiv B} \cos\phi + \underbrace{(\mathcal{A} - 1)}_{\equiv C} &= 0 \end{align} and finally: $$ \boxed{\cos \phi = \dfrac{-B \pm \sqrt{B^2 - 4AC}}{2A}}$$ Afterall if this is possible i get $\cos \phi$ and therefore $\phi$, $W_{ke}$ and finally $W_f'$.
{ "domain": "physics.stackexchange", "id": 8633, "lm_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, scattering", "url": null }
complexity-theory, asymptotics, security, definitions Title: Having trouble understanding blatantly non-private definition because of Little-o notation I was pretty confident that I understand asymptotic notation until now. However, I am having a hard time understanding some basic definition that use asymptotic notation, specially little-o. Definition 8.1.A mechanism is blatantly non-private if an adversary can construct a candidate database 'c' that agrees with the real database 'd' in all but o(n) entries, i.e.,‖c−d‖0∈o(n).
{ "domain": "cs.stackexchange", "id": 18332, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, asymptotics, security, definitions", "url": null }
is formed by stacking the straight lines one next to the other densely. for example, to find equation of a plane of a sheaf which passes, examples example 2: no points of intersection determine if the line i described by the symmetric equations intersects the plane 7r : 3m — 5z. Join Yahoo Answers and get 100 points today. r'= rank of the augmented matrix. What is the intersections of plane AOP and plane PQC? Thus far, we have discussed the possible ways that two lines, a line and a plane, and two planes can intersect one another in 3-space_ Over the next two modules, we are going to look at the different ways that three planes can intersect in IR3 . Each step extends along … Finding the Line of Intersection of Two Planes . 3. How to calculate angle between two planes when the direction vectors of normals of the planes are given as n1 = 2i + 4j - 2k and n2 = 6i - 8j - 2k. Our homes’ ceilings and floors are great examples of parallel planes. It is formed by stacking the straight lines
{ "domain": "resellernews.pl", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561694652216, "lm_q1q2_score": 0.8347066077150777, "lm_q2_score": 0.8615382076534742, "openwebmath_perplexity": 497.78685200673294, "openwebmath_score": 0.49194785952568054, "tags": null, "url": "https://resellernews.pl/road-to-iuprig/1cbc2f-example-of-two-planes-intersecting" }
soft-question, history, models Kolmogorov Turbulence Theory: Kolmogorov proposed an approximation to turbulence which derived the energy in each mode from an argument which does not require much more sophistication than dimensional analysis. The same theory was reproduced by Onsager and Heisenberg, probably completely independently, during the WWII years. The K41 theory predicts the velocity-velocity correlation functions in fully developed turbulent flow. The theory was first thought to be exact, but in the 1960s, it was slowly shown to be only a rough first approximation, with new phenomena of intermittency altering the correlation function power laws.
{ "domain": "physics.stackexchange", "id": 2690, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "soft-question, history, models", "url": null }
and rates rational numbers are whole numbers, never-ending decimals that can be written as a ratio two... Which do not terminate and have no repeating pattern of rational numbers are whole numbers, fractions and... 0.14 13/100 < 3/n < 0.14 13/100 < 3/n < 14/100 when is 13/100 < 3/n < 14/100 when 13/100. Given numbers, fractions, and decimals - the numbers should be infinite or something finite which we can look... Between the numbers should be infinite or something finite which we can see irrational... Terminating decimal is a rational number using rational numbers are whole numbers, fractions, and any terminating is... Non-Repeating digits after the decimal point example: find two irrational numbers be...: using the two decimals, we can not be written as ½ or 5/10, and θ non decimals... Learn the difference between rational and irrational numbers tend to have endless non-repeating digits the... Be expressed in a ratio of two integers irrational numbers can be as. To their properties
{ "domain": "euni.de", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587275910131, "lm_q1q2_score": 0.8667353661707351, "lm_q2_score": 0.8774767986961403, "openwebmath_perplexity": 407.1518889219758, "openwebmath_score": 0.7450292110443115, "tags": null, "url": "https://bik-f.euni.de/ukb8j9g/how-to-find-irrational-numbers-between-decimals-fbfb78" }
python, numpy, pandas for a, b in zip(short_lon_int_final, short_lat_int_final): ndir = a + b print ndir if not os.path.exists(ndir_root + ndir): os.mkdir(ndir_root + ndir) Please let me know if anything needs clarification. This is a smaller chunk out of a larger script so some variables appear undefined. Edit: Per comment requests a sample file has been linked. link to hdf file with lat/lon data. Bug and accidental quadratic runtime for lat_check in lat_list_str_copy_1: if letter & set(lat_check): lat_list_str3 = [i.replace('-', 'S') for i in lat_list_str_copy_1] else: lat_list_str3 = ['N' + lat_addchar for lat_addchar in lat_list_str_copy_1]
{ "domain": "codereview.stackexchange", "id": 23756, "lm_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, numpy, pandas", "url": null }
java, swing, gui, sudoku, backtracking The easiest propagation strategy is filling in Naked Singles. This can be done by trying all values for all empty cells, but a more efficient technique is collecting a set (or bitmask) of the possible values for all cells at once, and then going through them and promoting the singleton sets to filled-in cells. This is iterated until no more Naked Singles can be found. I benchmarked some code that implements that, that brings the test case that I'm using to around 2.2 seconds. There are more propagation strategies for Sudoku, for example Hidden Singles. Again they could be found by brute force, but an alternative strategy is re-using the sets/masks from filling in the Naked Singles and using them to find values that are in exactly one of the cells in a row/column/block. There are various ways to do it. I benchmarked this as well, and by analysing the rows and columns (but not blocks) for Hidden Singles, the time improved to less than 0.3 miliseconds.
{ "domain": "codereview.stackexchange", "id": 38407, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, swing, gui, sudoku, backtracking", "url": null }
convolutional-neural-networks, tensorflow, yolo, darknet 2.1 To my knowledge it is only NVIDIA's series of embedded products such as Jetson Nano which are SBC (single board computers) that, contrary to for example popular Raspberry PIs, also have some CUDA/tensorcores which makes them more suitable for DL models. Usually used in robotics, self-driving vehicles and some industrial sites. Small, light, compact and low power alternatives for regular PCs with GPU. 2.2 I don't think so, although there is some software/code/frameworks that helps you implement your models on these devices. But you still need to train you model with pytorch or tensorflow first.
{ "domain": "ai.stackexchange", "id": 3473, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "convolutional-neural-networks, tensorflow, yolo, darknet", "url": null }
organic-chemistry, aromatic-compounds I can solve the first two questions but I got confused about what the last question exactly asking for. Any help will be appreciated. You say you've already drawn the energy profile diagram for your proposed mechanism , now you want to make sure that your reaction mechanism proceeds through the most stable transition state , ( Least activation energy ) and therefore , on the energy profile diagram , the peak occuring at the transition state should not be too high .Also you wanna make sure that your final products have energies lesser than the reactants , because in that case , your $\Delta H$ would be $-ve$ and from the equation $\Delta G=\Delta H-T\Delta S $, there would be a greater chance your reaction moves forward. You also should have a look at this
{ "domain": "chemistry.stackexchange", "id": 9704, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, aromatic-compounds", "url": null }
universe, space-expansion, big-bang and you decided to try and drive straight into that edge, would you : ram into something similar to a wall OR Be Ripped apart? I don't know. But I do know there's another option. Remember the wave nature of matter, and think of what would happen to a wave inside a water droplet. It propagates through the droplet and encounters the surface, and then it undergoes total internal reflection. For all I know you drive straight into the edge, and all of a sudden you find yourself driving back the way you came. Note: I did read some other similar'ish posts and one specifically said "there is no edge of the universe", how can that be if the universe is supposed to be expanding ?
{ "domain": "physics.stackexchange", "id": 36849, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "universe, space-expansion, big-bang", "url": null }
quantum-mechanics, quantum-field-theory, quantum-information, quantum-spin, eigenvalue Second, how did he get the coefficients for the linear combination of spin-states? Third, how does he find the eigenenergies for this new basis? He tries to find the eigenstates and eigenvalues of $a^\dagger a + S_z$. You can easily verify that (2.1) and (2.2) are correct by checking e.g. that $(a^\dagger a + S_z) |n,+1\rangle = (n\omega_c + 2g\sqrt{n+1/2}) |n,+1\rangle$. In order to find the coefficients, he probably made the ansatz that an eigenstate of $a^\dagger a + S_z$ will be a linear combination $$ |\psi\rangle = \alpha |m_s=1,n-1\rangle + \beta |m_s=0,n\rangle + \gamma |m_s=-1,n+1\rangle $$ and solved the eigenvalue equation $(a^\dagger a + S_z) |\psi\rangle = \lambda |\psi\rangle$.
{ "domain": "physics.stackexchange", "id": 61391, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-field-theory, quantum-information, quantum-spin, eigenvalue", "url": null }
Please correct me if i am wrong. BSchool Forum Moderator Joined: 12 Aug 2015 Posts: 2580 GRE 1: 323 Q169 V154 STONECOLD'S MATH CHALLENGE - PS AND DS QUESTION COLLECTION. [#permalink] ### Show Tags 22 Jan 2017, 06:40 1 KUDOS Vianand4 wrote: Hi Stonecold ! First of all thanks for sharing these awesome conceptual questions. I have one doubt - Why "Z" cannot be -ve (Negative integer) for question no 1 in Mock test1 1)If z is divisible by all the integers from 1 to 5 inclusive,what is the smallest value of z? Possible minimum values for Z also include -60,-120 etc. 60 should be the smallest positive integer. Please correct me if i am wrong. Hi. Thanks for the feedback on the Quiz. Technically you are right. But the Bottom line is -> Factors and multiples on the GMAT are always positive integers. Hence z would always be 60. Regards Stone Cold _________________ Getting into HOLLYWOOD with an MBA The MOST AFFORDABLE MBA programs! STONECOLD's BRUTAL Mock Tests for GMAT-Quant(700+)
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9449947086083138, "lm_q1q2_score": 0.8259983497465878, "lm_q2_score": 0.8740772220439509, "openwebmath_perplexity": 4768.193114812097, "openwebmath_score": 0.49131280183792114, "tags": null, "url": "https://gmatclub.com/forum/stonecold-s-mock-test-217160-40.html" }
thermodynamics, special-relativity, waves, relativity, differential-equations Edit: I'll add a broader reformulation of the question, as suggested by a @CuriousOne comment: Can we find a first order equation that models the finite velocity limits or are we automatically being thrown back to second order equations? Is there a general mathematical theorem at play here about the solutions of first vs. second order equations? This is a subtle and somewhat complicated question, but I think the basic answer is ``no''. 1) The relativistic Boltzmann equation is $$ p^\mu\partial_\mu f = C[f] $$ which has the same structure as the non-relativistic Boltzmann equation. This equation can be used to derive relativistic Fokker-Planck equations. One example is the Landau collision term, which describes the scattering of charged particles in a relativistic plasma. The resulting FP equation has the same structure as the non-relativistic FP equation, see, for example http://www.sciencedirect.com/science/article/pii/0378437180901570 .
{ "domain": "physics.stackexchange", "id": 34832, "lm_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, special-relativity, waves, relativity, differential-equations", "url": null }
The basic idea is to consider the relationship between $i$ and $k$ in the inequality $$k \le \log_2 i < k+1.$$ We know from the continuity (and monotonicity) of $\log_2 x$ on $x > 0$, that for a given $i > 0$, there is always an integer $k$ such that this inequality holds, and that this integer is unique. Geometrically, what we are doing is finding, for any given $x = i$, a horizontal "strip" of height exactly $1$ on the graph of $y = \log_2 x$ such that the corresponding $y$-value for $x = i$ falls inside this strip, and that this strip must be positioned such that the boundary falls on integer values.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.993511730979676, "lm_q1q2_score": 0.8122698264238424, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 120.82419625439462, "openwebmath_score": 0.926931619644165, "tags": null, "url": "https://math.stackexchange.com/questions/2587371/what-is-the-summation-of-the-series-sum-i-0n-lfloor-log-2-n-rfloor" }
python, tree, python-2.x If optional argument 'node' is not provided, the entire quadtree's centre of mass will be updated. """ for nid in walk(node, topdown=False): # Empty node, reset to None if isempty(nid): totalmasses[nid] = 0 centremasses[nid] = None # External node, com is where the body is. if isexternal(nid): body = occupants[nid] totalmasses[nid] = masses[body] centremasses[nid] = positions[body] # Internal node, add children's com to parent. elif isinternal(nid): tmass, comx, comy = 0, None, None for child in childnodes[nid]: if isinternal(child) or isexternal(child): ccomx, ccomy = centremasses[child] ctmass = totalmasses[child] if comx is None: tmass, comx, comy = ctmass, ccomx, ccomy continue
{ "domain": "codereview.stackexchange", "id": 8763, "lm_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, tree, python-2.x", "url": null }
machine-learning, deep-learning, cnn, tranformation Title: What are differentiable modules used in deep learning I am reading this paper.
{ "domain": "datascience.stackexchange", "id": 2099, "lm_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, deep-learning, cnn, tranformation", "url": null }
electromagnetism If you envision a circular wire loop of area $A$ spinning with a diameter of the loop along the $\hat{z}$ direction as the axis of rotation, with a constant magnetic field $\vec{B}$ in the $\hat{y}$ direction, and we take the normal vector to the loop of wire $\vec{n}$, where $\vec{n} = cos(\omega t)\ \hat{x} + sin(\omega t)\ \hat{y}$, then the magnetic flux $\Phi$ is given by $$\Phi = \vec{B} \cdot A\ \vec{n}$$ $$\Phi = A\ B\ \hat{y} \cdot (cos(\omega t)\ \hat{x} + sin(\omega t)\ \hat{y})$$ $$\Phi = A\ B\ sin(\omega t)$$ Then using Faraday's law, the emf $\epsilon$ is $$\epsilon = - A\ B\ \omega\ cos(\omega t)$$ Which is indeed zero twice per rotation.
{ "domain": "physics.stackexchange", "id": 17143, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism", "url": null }
matlab, convolution, machine-learning Title: A Music Recommender System by Using Basis Functions and Inter Correlations So my university project is about music recommender system. My teacher not saying too much. But he only said it will use basis functions and convolution technique. I want some ideas about this project about how to create this. I have programmed in MATLAB and know basics of DSP like DFT (FFT), Correlation, Convolution etc. Any idea from experts? I would like to inform that this music recommendation system will be content based and it will use correlation technique to find music similarity with basis signal. So, what it sounds like your teacher is looking for is convolution (or correlation) of the music track spectrograms.
{ "domain": "dsp.stackexchange", "id": 4764, "lm_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, convolution, machine-learning", "url": null }
machine-learning, deep-learning, information-retrieval Title: Difference between paragraph2vec and doc2vec Is paragraph2vec the same as Doc2vec or is every approach different? There may be differing implementations, but these two terms refer to the same thing. Both convert a generic block of text into a vector similarly to how word2vec converts a word to vector. Paragraph vectors don't need to refer to paragraphs as they are traditionally laid out in text. They can theoretically be applied to phrases, sentences, paragraphs, or even larger blocks of text. Here's one definition of a paragraph vector: An unsupervised algorithm that learns fixed-length feature representations from variable-length pieces of texts, such as sentences, paragraphs, and documents. And the full paper if you are interested: https://cs.stanford.edu/~quocle/paragraph_vector.pdf
{ "domain": "datascience.stackexchange", "id": 1492, "lm_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, deep-learning, information-retrieval", "url": null }
c, primes, sieve-of-eratosthenes if (len == 0) return -1; for (int i = len - 1; i >= 0; i--) { if (inp[i] < 48 || inp[i] > 57) return -1; prev_out = out; out += (inp[i] - 48) * mult; mult *= 10; /* detect wrapping */ if (out < prev_out) return -2; } return out; } int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Syntax: number to find primes up to (max. %d)\n", MAX); return EXIT_FAILURE; } unsigned int max = to_int(argv[1]); if (max == -1) { fprintf(stderr, "Syntax: number to find primes up to (you typed %s, which is not a valid number)\n", argv[1]); return EXIT_FAILURE; } if (max > MAX || max == -2) { printf("Warning: the number you typed was outside of the limit. It has been set to %d.\nPress the return key to continue...\n", MAX); max = MAX; getchar(); } max++;
{ "domain": "codereview.stackexchange", "id": 28188, "lm_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, primes, sieve-of-eratosthenes", "url": null }
navigation, odometry, mapping, amcl Comment by arkin8858 on 2019-05-20: @silgon, its very nice code to implement get the obstacle distance from map. i tried to use this code into my project but unfortunately got some errors. tried to solve the errors but still the same. could you please help me to findout the solution. the error is about no matching function for call to 'ros::NodeHandle::subscribe(const char [14], int, std::pair<double, double> (&)(geometry_msgs::PoseStamped&, nav_msgs::OccupancyGrid&))' . looking forward to your reply. thanks .
{ "domain": "robotics.stackexchange", "id": 23881, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, odometry, mapping, amcl", "url": null }
electrostatics, charge, potential, work, self-energy If you want an example, take a situation where I flatten a system of charges completely, to create a sheet charge distribution. We obviously cannot use this formula here. If you are gonna tell me it isn't a physical situation so I shouldn't worry about it, think of what happens when a battery does work to charge up a parallel plate capacitor? Blobs of electrons inside a thick (somewhat)'wire suddenly redistributes itself into a thin plate? The work we are calculating using the formula would give us wrong results right? (According to my intuition, i think it'll give wrong results) (I suppose one could consider the whole system of wires and capacitors as a system, excluding the battery, and assert that the change in the macroscopic work would simply be the change in the energy stored in the macroscopic fields, (derived from Maxwell's laws), but it is still not clear what happens to the self energy terms) QUESTIONS
{ "domain": "physics.stackexchange", "id": 95185, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, charge, potential, work, self-energy", "url": null }
condensed-matter, solid-state-physics, many-body, fermi-liquids \approx& \sqrt{[2k_F^2+k_s^2-q^2/2]^2-1/4[4k_F^2-q^2]^2 } \notag\\ &=\sqrt{4k_F^4+4k_F^2k_s^2-2k_F^2q^2+k_s^4-k_s^2q^2+q^4/4-4k_F^2+2k_F^2q^2-q^4/4 }\notag\\ &=\sqrt{4k_F^2k_s^2+k_s^4-k_s^2q^2}\notag\\ &=k_s\sqrt{4k_F^2+k_s^2-q^2} \end{align} This leads to Eqn. 24 in the text, a major result in this paper which, from the above calculation, is shown to be correct.
{ "domain": "physics.stackexchange", "id": 68435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, solid-state-physics, many-body, fermi-liquids", "url": null }
The rotational stiffness at the end of the original beam element is Ke = 6EIz/L (where E is the modulus of elasticity, Iz the moment of inertia, and L the length of the beam), and the ratio of the rotational spring stiffness, Ks, to the elastic beam stiffness, Ke, of the modified beam element is defined as n = Ks/Ke. 1 Introduction to beam and strip analysis - scope and basic assumptions 2. If you think of a structures which has multi degrees of freedom, then you will have many stiffness term associated with these degrees of freedom. References:- Stiffness Matrix (Basics & Concepts) https://www. 3 September 18, 2002 Ahmed Elgamal u1 1. As an example of the method, the lumped force stiffness matrix formulation using the numerical integration is presented for the beam, shell, and rectangular plate elements. The element stiffness matrix will become 4x4 and accordingly the global stiffness matrix dimensions will change. Shear stiffness (12x12 matrix) Element stiffness matrix The integrals
{ "domain": "from.bz", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984093612020241, "lm_q1q2_score": 0.8068517944104765, "lm_q2_score": 0.8198933359135361, "openwebmath_perplexity": 1084.4198485600286, "openwebmath_score": 0.6988890767097473, "tags": null, "url": "http://xxqn.from.bz/stiffness-matrix-for-beam.html" }
evolution, adaptation, addiction The reward centers have been crucial in evolution, as they provide motivation to vital acts of life, including eating and sex (University of Colorado, Boulder). Without a proper reward system, why eat or reproduce? However, drugs and other addictive acts such as gambling also activate the reward system. Highly purified drugs such as crystal meth and cocaïne result in massive dopamine release that is unparalleled by normal physiologic processes such as eating. Before the occurrence of stimulants and things like gambling, the reward system was nothing but essential to life and evolution. Now, things are different and man needs to adapt to these novel, artificial pleasures in life. References - Treatment Improvement Protocol (TIP) Series, No. 33. Center for Substance Abuse Treatment. Rockville (MD); 1999 - Wise & Bozarth, Psychiatr Med (1985); 3(4): 445-60
{ "domain": "biology.stackexchange", "id": 6218, "lm_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, adaptation, addiction", "url": null }
ros, call-service Originally posted by elpidiovaldez on ROS Answers with karma: 142 on 2021-07-06 Post score: 0 Original comments Comment by gvdhoorn on 2021-07-07: Is permanent actually persistent here? Comment by elpidiovaldez on 2021-07-12: Yes, I did mean 'persistent'. I don't even remember where I got the idea they were called 'permanent' connections now. It was something I read while investigating them. I found a discussion on ROS Answers which solved the issue for me. It is here. I simply needed to wait for the service to be created, by the launch file, before I create the service client. The way to do it is shown below: void InitializeTTS(ros::NodeHandle &n) { ros::service::waitForService("/tts"); TTSclient = n.serviceClient<tts_serv::Gtts>("/tts",true); } Thanks to @appie for the advice. I looked at rosparam documentation, but I could not see how to use it to solve my issue.
{ "domain": "robotics.stackexchange", "id": 36656, "lm_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, call-service", "url": null }
homework-and-exercises, spring, statics Title: Weight Suspended From A Springlike Belt This situation is similar to the physics involved in a slack line, though I'm looking at it for some CNC applications. There is a 3meter belt, that is tightened to be under 200N of tension between two fixed points (attached with a swivel). Assume the weight of the belt itself is negligible. Once tightened - a mass is then suspended in the middle which applies 400N of force downwards. This should dramatically increase the tension forces on the belt. The belt functions like a very stiff spring; it has the property that it takes 25,000 N to cause a 1% increase in length. Is there a closed form solution to the deflection and new tension force on the line? You start with a slack belt that is going to be tensioned between two fixed points $S$ distance apart. The free length $\ell_0$ is unknown at this point.
{ "domain": "physics.stackexchange", "id": 86983, "lm_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, spring, statics", "url": null }
To give you more examples, if that $\varepsilon$-$\delta$ relation is the same at all the points, we get uniform continuity. If we strengthen it further, e.g. if that $\varepsilon$-$\delta$ relation is linear, we get Lipschitz continuity (or α-Hölder continuity if the relation is like function $x \mapsto x^\alpha$). On the other hand, continuously differentiable functions are these, which change in a way so that we are able to tell, in a consistent manner, what that change is (note that $x\mapsto x^2$ on $\mathbb{R}$ continuously differentiable, but not uniformly continuous or Lipschitz). Finally, if you get out of $\mathbb{R}^n$ into more complex spaces, there are yet different notions and definitions of continuity (the one I like the most is via nets, you can find some more info about it here), but that's not the subject of this post. I hope that helps $\ddot\smile$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9504109812297141, "lm_q1q2_score": 0.803992983751917, "lm_q2_score": 0.845942439250491, "openwebmath_perplexity": 160.59274018035487, "openwebmath_score": 0.9422575235366821, "tags": null, "url": "https://math.stackexchange.com/questions/1025890/what-does-continuity-in-general-mean" }
Also, take the second derivative, and graph that first. It is easier to compute, and will be a handy reference (for concavity). In drawing freehand, it helps to know what you want to draw ahead of time. The logarithm, $y=\ln x$, should definitely be in your repertiore of images, along with the trigonometric functions and $y=e^x$ (and others like $y=x^n$, $y=mx+b$, $(\frac{x}{a})^n+(\frac{y}{b})^n=1$, $y=|x|$, $y=\lfloor x\rfloor$, etc.), which you can draw a rough sketch of from memory. - Typically, when they ask you to sketch something, they're just asking you to get the major features right. Things like asymptotes, zeros, known special points, increasing/decreasing, maybe even concavity. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854155523791, "lm_q1q2_score": 0.8123116222506316, "lm_q2_score": 0.837619961306541, "openwebmath_perplexity": 396.8130385030653, "openwebmath_score": 0.8818645477294922, "tags": null, "url": "http://math.stackexchange.com/questions/108648/sketching-the-natural-logarithm-without-calculator" }
This is correct! Just a few comments, though: If $G$ has no nontrivial subgroups $\Rightarrow$ $G$ is infiinite or $|G|=p$. This is probably a typo, where you meant to say $|G| \neq p$? There is also another small assumption, namely that the group $G$ itself is not trivial, for if it were trivial then it has no non-trivial subgroups, but its order is $1$, which is not prime. EDIT: I went through the chat discussion linked in the comments under the question. The point Stephen is raising is that the first sentence of the proof is incorrectly worded. I chose to overlook this initially because I assumed English is not the OP's first language. The point is that the first sentence: Suppose by contradiction: If $G$ has no nontrivial subgroups $\Rightarrow$ $G$ is infiinite or $|G|=p$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812290812825, "lm_q1q2_score": 0.8111354456703799, "lm_q2_score": 0.837619959279793, "openwebmath_perplexity": 269.41830075323617, "openwebmath_score": 0.8873001933097839, "tags": null, "url": "https://math.stackexchange.com/questions/2544721/if-g-has-no-nontrivial-subgroups-show-that-g-must-be-finite-of-prime-order" }
ros, mapping, octomap, octomap-mapping Originally posted by AHornung with karma: 5904 on 2013-10-25 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 15918, "lm_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, mapping, octomap, octomap-mapping", "url": null }
organic-chemistry, dipole, heterocyclic-compounds Title: Dipole moments of pyrrole and furan Why do pyrrole and furan have dipoles oriented in different directions? Both pyrrole and furan have a lone pair of electrons in a p-orbital, this lone pair is extensively delocalized into the conjugated pi framework to create an aromatic 6 pi electron system. Where pyrrole and furan significantly differ is that, in pyrrole there is an $\ce{N-H}$ bond lying in the plane of the ring and directed away from the ring whereas in furan, there is a full lone pair of electrons in roughly the same position. The localized lone pair of electrons pointing away from the ring has a very significant effect on the dipole vector and is enough to cause the observed reversal in dipole moment direction between furan and pyrrole.
{ "domain": "chemistry.stackexchange", "id": 12635, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, dipole, heterocyclic-compounds", "url": null }
java, algorithm, concurrency, sieve-of-eratosthenes, bitset /** * Tries to insert a node holding element to replace this node. failing if already deleted. * * @param newElement * the new element * @return the new node, or null on failure. */ Node replace(int newElement) { for (;;) { Node b = getPrev(); Node f = getNext(); if (b == null || f == null || f.isMarker()) return null; Node x = new Node(newElement, f, b); if (casNext(f, new Node(x))) { b.successor(); // to relink b x.successor(); // to relink f return x; } } }
{ "domain": "codereview.stackexchange", "id": 21091, "lm_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, algorithm, concurrency, sieve-of-eratosthenes, bitset", "url": null }
neuroscience, nutrition Title: How do neurons receive the ions needed for creating electrical pulses? I really wonder how ions are transported into the brain and the neurons for creating electrical potentials - how do ions get from our digestive system to the neurons? Or are the ions just freely released into the brain like hormones? Or are they transmitted during neural signalling somehow (via neurotransmitters maybe)? Short answer The sodium-potassium pump in the epithelial cells lining the brain capillaries pumps Na+ and K+ into the brain. Background
{ "domain": "biology.stackexchange", "id": 4425, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, nutrition", "url": null }
# Formula for calculating $\sum_{n=0}^{m}nr^n$ I want to know the general formula for $\sum_{n=0}^{m}nr^n$ for some constant r and how it is derived. For example, when r = 2, the formula is given by: $\sum_{n=0}^{m}n2^n = 2(m2^m - 2^m +1)$ according to http://www.wolframalpha.com/input/?i=partial+sum+of+n+2%5En Thanks! • @dragoncharmer Either you tag this [algebra-precalculus] or you tag it [taylor-expansion]. Those are quite mutually exclusive tags. – Pedro May 2, 2012 at 1:46 • Sep 23, 2017 at 6:12 I see that one of the tags is pre-calculus, so here is a way to answer the question that does not use differentiation: $S = r + 2r^2 +3r^3 +\dots + (m-1)r^{m-1}+mr^m$ $rS = \ \ \ \ r^2 +2r^3 +\dots + (m-2)r^{m-1}+(m-1)r^m + mr^{m+1}$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795091201804, "lm_q1q2_score": 0.811483817996208, "lm_q2_score": 0.8221891239865619, "openwebmath_perplexity": 212.52469448787227, "openwebmath_score": 0.9133064150810242, "tags": null, "url": "https://math.stackexchange.com/questions/119636/formula-for-calculating-sum-n-0mnrn" }
ros, moveit, ros-kinetic, movegroup Title: How to fix end effector direction to approach object with MoveIt Hello, My question is that how to fix end effector orientation to approach object(move forward) with MoveIt? I already let my robot to move to a given goal position(x, y, z). If I would like to let robot grasp the object, move and approach it slowly is necessary. So I want to move the robot 15cm forward by fixed direction of end effector. As shown in the picture: Does MoveIt or others have any function can achieve this? If you can provide me example code with python will be better. Thanks a lot. Originally posted by A_YIng on ROS Answers with karma: 37 on 2019-05-29 Post score: 0 You can use constraint messages to approach, for example as explained in q174095 Originally posted by aPonza with karma: 589 on 2019-05-30 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 33082, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, ros-kinetic, movegroup", "url": null }
solutions, electrons, metal, optical-properties, solvated-electrons They actually show that the solvated electron in water is bound strongly enough to have multiple electronic states (they match with experiment quite well), and they can be seen to be s-like and p-like. That is, one of them is roughly spherical while the other has a node with a smaller lobe. Again, keeping our analogy with a proton in mind, these electrons are much larger than how we think of a proton in water. Both, however, induce a local structure in the water molecules to stabilize the excess charge. The fact this aqueous electron has at least two electronic states tells us already that it is probably bound more strongly than the electrons in the sodium/liquid ammonia solution (at least for the concentrated solution). The difference being that excess electrons in water are going to be very dilute (there's not many of them), while the sodium/ammonia ones are quite concentrated when we see them.
{ "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 }
classical-mechanics, lagrangian-formalism, constrained-dynamics, degrees-of-freedom Impose a relationship between two or more degrees of freedom, for example $5\sqrt{r_1}=2r_2^2$, or Impose a relationship between one or more degrees of freedom and a constant, for example $r_1=5$. Your equation $r_1=x$ does neither of these things. It relates a single degree of freedom to a non-constant parameter. As such, it's not a constraint by itself. You can actually see this relatively easily - by substituting $r_1=x$ into the other two equations, you get two equations that do satisfy the definition of constraint: $$r_2-r_1\sin{r_1}=0$$ $$r_3-e^{r_1^2}=0$$
{ "domain": "physics.stackexchange", "id": 57837, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, lagrangian-formalism, constrained-dynamics, degrees-of-freedom", "url": null }
cc.complexity-theory, complexity-classes, time-complexity Given $f: \{0,1\}^* \to \{0,1\}^*$, define: $\bar{f}: \{0,1\}^* \times \mathbb{N} \to \{0,1\}$ to be $\bar{f}(x,j) = 1$ iff $|f(x)| \leq j$. (Here $|\cdot|$ is string length.) $\hat{f}: \{0,1\}^* \times \mathbb{N} \to \{0,1\}$ to be $\hat{f}(x,j) = f(x)_j$, i.e. the $j$th bit of $f(x)$. If $j$ is larger than $|f(x)|$, the output of $\hat{f}(x,j)$ can be, let's say, always $0$. Now I will leave it as an exercise to prove that if $f$ is computable in polynomial time, then $\bar{f}, \hat{f}$ are in P; and if $\bar{f}, \hat{f}$ are in P, then $f$ is computable in polynomial time. You do need the idea you mentioned, that $|f(x)| \leq |x|^c$ for some $c$.
{ "domain": "cstheory.stackexchange", "id": 4132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, complexity-classes, time-complexity", "url": null }
solar-system, formation, asteroid-belt Title: How has the average distance between asteroids in the asteroid belt changed over time? Just about every webpage related to asteroids states that, on average, asteroids are about 600,000 miles apart from one another. Have planetary scientists hazarded a guess at how close they might have been 4 billion years ago? 2 billion years ago? 200 million years? I'm not looking for a particular age range, just an understanding of the trend over time. Unfortunately, I'm having trouble looking up an answer to this question on my own because the keywords I've thought of keep grabbing other unrelated things Thank you! The asteroids formed roughly where they are now, from matter in the sun's protoplanetary disc that didn't form into a larger body (at least partly under the influence of Jupiter's gravity)
{ "domain": "astronomy.stackexchange", "id": 4953, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solar-system, formation, asteroid-belt", "url": null }
c++, state-machine, sfml, entity-component-system, pong #pragma once #include "User_Data.hpp" #include "EnTT/Event_Dispatcher.hpp" #include "Event/Scored.hpp" #include <box2d/b2_world_callbacks.h> #include <box2d/b2_contact.h> #include <iostream> namespace System { class Collision : public b2ContactListener { public: Collision(EnTT::Event_Dispatcher& event_dispatcher) : event_dispatcher {event_dispatcher} {};
{ "domain": "codereview.stackexchange", "id": 42092, "lm_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++, state-machine, sfml, entity-component-system, pong", "url": null }
c#, animation, wpf, timer private void Timer_Tick(object sender, EventArgs e) { Seconds--; if (Seconds == 0) _timer.Stop(); } } Control is placed on Window like this <local:Countdown Width="300" Height="300" Seconds="25" /> I don't like that you are running two timers/timelines in parallel. Instead you could run the animation from code behind. It also gives you the opportunity to trigger it from other places than load: private void StartAnimation() { double from = -90; double to = 270; int seconds = Seconds; TimeSpan duration = TimeSpan.FromSeconds(Seconds); DoubleAnimation animation = new DoubleAnimation(from, to, new Duration(duration)); Storyboard.SetTarget(animation, Arc); Storyboard.SetTargetProperty(animation, new PropertyPath("EndAngle")); Storyboard storyboard = new Storyboard(); storyboard.CurrentTimeInvalidated += (s, e) => { int diff = (int)((s as ClockGroup).CurrentTime.Value.TotalSeconds); Seconds = seconds - diff; };
{ "domain": "codereview.stackexchange", "id": 31053, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, animation, wpf, timer", "url": null }
c++, arduino } Note: Because this code is for an Arduino, I cannot use any standard library functions or imports. However, because this section of our code is pure c++, I don't think it will be an issue. But please consider that if you decide to write an answer. Thanks! Pass small trivial types by value. void f(unsigned ui); // GOOD void f(const unsigned& ui); // WORSE C and C++ don't do parameters of function type; they do parameters of function pointer type. void f(void callback()); // BAD void f(void (*callback)()); // GOOD See Linus Torvalds' take on "parameters of array type", and then apply the same attitude to "parameters of function type." Don't write them. Write what you mean, instead. Prefer signed int over unsigned int, unless you're doing bit-twiddling. Especially in your case, where the user might legitimately pass in a secondThreshold of zero or negative. See "The unsigned for value range antipattern" (2018-03-13).
{ "domain": "codereview.stackexchange", "id": 40233, "lm_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++, arduino", "url": null }
laser, quantum-optics, optics Going back to your original question though, less than single-cycle pulses can, strictly speaking, still propagate. However, they will never propagate with a stable waveform since the low-frequency components travel with large angles with respect to the propagation axis. In this way the pulse is under continuous change and always becomes at least single-cycle in the far-field. You might argue that, in principle, you could make a subcycle pulse propagate over long distances given a source of sufficient size (assuming you can excite a subcycle to begin with). In this case "sufficient size" would imply that the spatial dimensions of the source are much larger than the propagation length. For optical wavelengths such a scenario might be possible for fabricated nanostructures where propagation lengths are only hundreds of nanometers long. Obviously, on the other side of the room any traces of a subcycle pulse will be gone.
{ "domain": "physics.stackexchange", "id": 10532, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "laser, quantum-optics, optics", "url": null }
filters, lowpass-filter, stability, biquad @Override protected void computeGains(double qualityFactor) { normalized= 1 / (1 + coefK / qualityFactor + coefK * coefK); feedforward0 = coefK * coefK * normalized; feedforward1 = 2 * feedforward0; feedforward2 = feedforward0; feedback1 = 2 * (coefK * coefK - 1) * normalized; feedback2 = (1 - coefK / qualityFactor + coefK * coefK) * normalized; System.out.println("LPF.computeGains : "+feedforward0+" ; "+feedforward1+" ; "+feedforward2+" ; "+feedback1+" ; "+feedback2); } And here is the routine : protected LinkedList<Integer> inputValues2 = new LinkedList<Integer>(); protected LinkedList<Double> outputValues2 = new LinkedList<Double>();
{ "domain": "dsp.stackexchange", "id": 7051, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, lowpass-filter, stability, biquad", "url": null }
c#, multithreading, web-services // To many Init-Tries --> Stop if (initializationTries > 1) { // Proceed _syncResetEvent.Set(); _syncStatus = syncStatus; break; // Stop Synch } // Debug var sw = System.Diagnostics.Stopwatch.StartNew(); // Do Up/Download if (!initialization) { try { // Synchronisation with service here... // .............................. ////////////////////////////////////
{ "domain": "codereview.stackexchange", "id": 4657, "lm_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, web-services", "url": null }
reinforcement-learning, reference-request, markov-decision-process, risk-management Please help me if you can in this regard (authentic references are appreciable). I am assuming you are interested in the case where the objective function is the expected sum of discounted rewards. I realize this answer is probably not directly applicable in the RL context, but might be helpful nevertheless. In a finite horizon MDP, an optimal action in a particular state depends not only on the state, but also on the time remaining until the end of the horizon. If there are a lot of decisions remaining after the current one, it makes sense to consider the long-term effects of the current decision. Conversely, if the current decision is the last one, maximizing the immediate reward is all one cares about. Therefore, the solution of a finite horizon MDP with horizon $T$ is a sequence $(\pi_T, \pi_{T-1}, \ldots, \pi_1)$ of policies, where a policy $\pi_t:S \to A$ maps the state to the action when $t$ decisions remain until the end of the horizon.
{ "domain": "ai.stackexchange", "id": 3513, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, reference-request, markov-decision-process, risk-management", "url": null }
thermodynamics, temperature, everyday-life, water, phase-transition I expected no confusion regarding such steam causing more severe effects. But now that it has, let me mention that this is a common secondary textbook fact, that is taught and studied in India. Here is a link to a related school material: https://byjus.com/questions/what-produces-more-severe-burns-boiling-water-or-steam/. TL;DR: You have probably not been exposed to 100°C water in either phase and even if you had, you could not have reasonably felt its temperature on account of receiving a third-degree burn. Hot water and steam are both dangerous but fundamentally different, so comparing them is like gorilla vs. shark. I am not exactly sure what you are comparing here, but if you take a sufficiently large piece of your skin and expose it to 100 °C water (in either phase) for a sufficiently long time for your temperature sensors to actually give a reasonable result, you would suffer from a severe burn.
{ "domain": "physics.stackexchange", "id": 93803, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, everyday-life, water, phase-transition", "url": null }
human-biology, nutrition How a vegan can complete these missing proteins? Proteins are made up of amino acids. It isn't particular proteins that are necessary in diet, but particular amino acids. For humans, these come primarily from breaking down the proteins in foods we eat. Essential amino acids are the amino acids that humans cannot synthesize; other amino acids can be synthesized from these, but they do not need to be part of the diet. Not all sources of protein have sufficient quantities of all of the essential amino acids. When people refer to a protein source as "incomplete" they mean that particular source is low on one or more of the essential amino acids. Meat products are typically "complete" because they contain all of the essential amino acids together. Therefore, if you subsisted on various foods but only got your protein from one animal source, you would be okay.
{ "domain": "biology.stackexchange", "id": 7545, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, nutrition", "url": null }
acid-base, redox, metal Title: Why does HNO3 not give off H2 when reacting with Cu? A dilute solution of which acid is most likely to produce a reduction product other than $\ce{H_{2}}$ when it reacts with a metal? (A) $\ce{HF}$ (B) $\ce{HCl}$ (C) $\ce{HNO3} $ (D) $\ce{H2SO4}$ $\tiny{\text{Question from 2012 local chemistry olympiad}}$
{ "domain": "chemistry.stackexchange", "id": 960, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acid-base, redox, metal", "url": null }
∫x² e dx x x Take x² as the function and e as the second function and integrating by parts, we get I = x² e - ∫2x e x X dx I = x² e – 2 [xe - ∫e dx] = x² e – 2xe + 2e + C, Again apply by parts in second term, we get x x I = x² e – 2 [xe - ∫e dx] X X = x² e – 2xe + 2e + C, Where c. is the constant of integration X Integration by partial fraction If f(x) and g(x) are two polynomials, then f(x)/g(x) is called a rational algebraic Function of x. Any rational f (x)/ g(x) can be expressed as the sum of rational functions each having a simple factor of g(x). Each such fraction is called a partial fraction. 3x 1. ∫ dx (x-1) (x+2) A B = + X-1 X + 2 3x = A (X + 2) + B (X + 1) Put,, X = we get 3 = 3A A = 1 Put, x = -2 we get - 6 = - 3B B = 2 ∫ ∫ ∫ = (x+2) (x-1) 2 + 1 X - 1 3x X-1 X + 2 3x dx + 2 X + 2 Now integrating, we get 3x 2 1 X - 1 dx = dx + 2 ( x - 1 ) ( x + 2) X + 2 = log ( x – 1 ) + 2 log ( x + 2 ) + c Thank you Presented by, NUZHAT SHAHEEN
{ "domain": "slideplayer.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540734789342, "lm_q1q2_score": 0.8096435568442178, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 1517.4053579791018, "openwebmath_score": 0.8996493816375732, "tags": null, "url": "https://slideplayer.com/slide/6879874/" }
binary-star, gravitational-waves The period of the orbits is decreasing. That is, the two stars are gradually getting closer together. This effect is a consequence of general relativity, that predicts that such massive objects that are so close to each other will act as a source of gravitational waves. The gravitational waves have not (yet) been directly observed, but GR makes a prediction for how much energy they carry away and hence at what rate the orbital period changes. The rate of decrease in the distance between two bodies is given by $$\frac{dr}{dt} = -\frac{64G^3}{5c^5}\frac{(m_1 m_2)(m_1+m_2)}{r^3}$$ and leads to a merger between the two objects in a time of $$t = \frac{5c^5}{256G^3}\frac{r^4}{(m_1 m_2)(m_1+m_2)}, $$ where $m_1$ and $m_2$ are the masses of the two orbiting bodies, $G$ is the gravitational constant and $c$ is the speed of light. In slightly more friendly units $$ \frac{dr}{dt} = 7.8\times10^{-19} \frac{(M_1 M_2)(M_1+M_2)}{r^3}\ au/yr,$$
{ "domain": "astronomy.stackexchange", "id": 842, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "binary-star, gravitational-waves", "url": null }
rail scale model catenary is much less flexible than full size: the wire thickness of the scale model is not in proportion, so the wire is much stiffer. scale models use 12V, which has no electrocution risk and arcing is much less of an issue than in the full-size system. Due to the much lower speeds and shorter running times, wear in a scale model is much less of an issue than in the full-size system. due to the much lower weight, power interruptions are more of an issue in the scale model than in the full-size system.
{ "domain": "engineering.stackexchange", "id": 3072, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rail", "url": null }
c++, c++11, binary-search-tree The caller could then do: ShelterBST shelter; … auto printPet = [](Pet* pet) { std::cout << "Name: [" << pet->name << "] Age: [" << pet->age << "]\n"; }; shelter.inOrderVisit(printPet); Note that printPet is a lambda in this example (still C++11), but you could just make it a regular function as well. You want to write a test for pre-order traversal? There is no more need for a preOrderHelper(); just pass preOrderVisit() a different function: ShelterBST shelter; shelter.addPet("F", 1"); shelter.addPet("C", 2"); … std::vector<std::string> names; shelter.preOrderVisit([&](Pet *pet){ names.push_back(pet->name); }); A more advanced option would be to add iterators, so you can use a range-for loop. It would allow you to write code like this: ShelterBST shelter; … for (Pet* pet: shelter.preOrder()) { std::cout << "Name: [" << pet->name << "] Age: [" << pet->age << "]\n"; }
{ "domain": "codereview.stackexchange", "id": 44746, "lm_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, binary-search-tree", "url": null }
javascript, sorting Arrays can be a const since you will not modify the array itself but just push new elements to the array. In your functions sortAsc, sortDesc, you are iterating through arr just to make it lowercase and iterating through the array again in sortedList.sort(). In such scenarios, think about how you can reduce number of iterations. sort() does in-place sorting, so no need to create a new array. In function populateList by running arr.map you are creating another new array which I don't think is necessary. const listArea = document.getElementById('listArea'); const btnAsc = document.getElementById('asc'); const btnDes = document.getElementById('des'); const architects = [ "Lloyd Wright", "Hadid", "Mies van der Rohe", "Le Corbusier", "Foster", "Gaudi", "Piano", "Gropius", "Niemeyer", "Aalto", "Saarinen", ]; function sortAsc() { architects.sort(); populateList(); } function sortDes() { architects.sort().reverse(); populateList(); }
{ "domain": "codereview.stackexchange", "id": 41008, "lm_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, sorting", "url": null }
$ s=5t^2+v_0t+s_0 $ where $v_0$ is the initial velocity, and $s_0$ is the initial displacement. RonL Can you show us how to use the formula? You are told that when $t=2$ $s=0$ so: $0=5\times 2^2+v_0 \times 2+s_0$, and when $t=3$ $s=25$, so: $25=5\times 3^2+v_0 \times 3+s_0$. These constitute a pair of simultaneous equations for $v_0$ and $s_0$. Solve these and you will have found the initial displacement $s_0$ (which will be negative with the sign convention used here, change its sign if you think that the questioner wanted it positive). RonL 7. Originally Posted by CaptainBlack You are told that when $t=2$ $s=0$ so: $0=5\times 2^2+v_0 \times 2+s_0$, and when $t=3$ $s=25$, so: $25=5\times 3^2+v_0 \times 3+s_0$. These constitute a pair of simultaneous equations for $v_0$ and $s_0$.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307708274402, "lm_q1q2_score": 0.8189539010390886, "lm_q2_score": 0.8418256551882382, "openwebmath_perplexity": 630.5288645293039, "openwebmath_score": 0.8364307284355164, "tags": null, "url": "http://mathhelpforum.com/advanced-applied-math/5347-body.html" }
javascript if (addressType == 'postal_code') { var zipcode = place.address_components[i][componentForm[addressType]]; } } } document.getElementById('fullAddress').value = streetNumber + ' ' + route + ', ' + locality + ', ' + state + ' ' + zipcode; Use if.else if.else if ladder: Instead of multiple conditions of if.if.if, you should use if.else if.else if ladder. The advantage of latter is that once a condition is met, the next conditions are skipped. But using only if.if.if means all the ifs are walked through irrespective of any if matching the condition. Read more about it here It is generally a good idea to save repeating variables like place.address_components[i][componentForm[addressType]] in a variable to avoid its repetition and errors
{ "domain": "codereview.stackexchange", "id": 36987, "lm_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", "url": null }
classification, scikit-learn, supervised-learning So e.g. if the 2 features of 3 neighbors are age and gender with values: age,gender=[ [20,M], [31,F], [23,M] ], and we need to pick the 2 nearest neighbors for a new observation [20,F], how do we convert the gender to a numeric scale to compute euclidean distances? It doesn't handle categorical features. This is a fundamental weakness of kNN. kNN doesn't work great in general when features are on different scales. This is especially true when one of the 'scales' is a category label. You have to decide how to convert categorical features to a numeric scale, and somehow assign inter-category distances in a way that makes sense with other features (like, age-age distances...but what is an age-category distance?). If all features are categorical, and inter-category distances are all treated as somehow equal, your job actually gets a little easier since you aren't converting between categorical and scalar scales.
{ "domain": "datascience.stackexchange", "id": 2468, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classification, scikit-learn, supervised-learning", "url": null }
python, performance, numpy indicator_normalized = indicator_normalized.transpose(0, 2, 1) # summing over multiple axis needs numpy >= 1.7 indicator_sum = indicator_normalized.sum(axis=(0, 1)) Next up on the list: maximization. Let's get rid of some loops here. A first step in that direction might look as follows: # Maximization step for i in range(range_of_i): for j in range(range_of_m): mu_updated += indicator_normalized[i, j, :] * alphas[i, j] / indicator_sum pi_updated += indicator_normalized[i, j, :] / (range_of_i * range_of_m) # same for loop again needed because we want to use the complete mu_vector to calculate sigma_squared for i in range(range_of_i): for j in range(range_of_m): sigma_squared_updated += \ indicator_normalized[i, j, :] * (alphas[i, j] - mu_updated)**2 \ / indicator_sum
{ "domain": "codereview.stackexchange", "id": 35189, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, numpy", "url": null }
# Thread: How many subspace in F2? 1. ## How many subspace in F2? Hi, I have to find the number of subspaces of $\mathbb F^2$ where $\mathbb F$ is a finite field with $n$ elements. I know there are the trivial subspaces. I thought the subspaces may be the possible lines ( I mean the possible inclinations ) For example, $\mathbb F_7^2$ would have the lines whose parallel vectors are (0,1) (0,2) ... (0,6) (1,0) (1,1) (1,2) (1,3) ... (1,6) (2,0) (2,1) (2,3) (2,5) etc. Is it right?
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9914225140794153, "lm_q1q2_score": 0.832531155422866, "lm_q2_score": 0.8397339616560072, "openwebmath_perplexity": 286.0248850870957, "openwebmath_score": 0.9724882245063782, "tags": null, "url": "http://mathhelpforum.com/advanced-algebra/67690-how-many-subspace-f2.html" }
everyday-chemistry, electrochemistry, cleaning To quote UMass Amherst, presenting it as a lecture demonstration, the chemistry may be summed up to this equation $$\ce{3 Ag2S(s) + 2 Al(s) + 3 H2O (l) –> 6 Ag(s) + 3 H2S (aq) + Al2O3(s) }$$ The addition of salt (which is absent in the equation) serves to increase the electric conductivity of the solution, hence increasing the rate of this process. Immerse the jewlery in the hot solution (it needn't be boiling), for example wrapped in the creased foil for some minutes; then rinse and wipe it with a cloth.
{ "domain": "chemistry.stackexchange", "id": 7980, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "everyday-chemistry, electrochemistry, cleaning", "url": null }
What is conditional convergence? Is my attempt right? I'll be answering this since it seems to me that you don't know what condition convergence is, rather than solving the question. First of all, your attempt is correct. The series is convergent. As for what is a conditional convergence, we say that $\sum a_k$ converges conditionally if $$\lim\limits_{n\to \infty}\sum_{k=1}^{n} a_k = L$$ While at the same time, $$\lim\limits_{n\to \infty}\sum_{k=1}^{n} |a_k| = + \infty$$ Or alternately, the limit of the absolute values does not converge. In your question, we have that $a_k = (-1)^k \frac{\ln k}{k}$ and you proved that the series converges, while $|a_k|$ is $\frac{\ln k}{k}$ and you can take it as an exercise to prove that $\lim\limits_{n\to \infty}\sum_{k=1}^{n} |a_k| = \infty$ A slightly less formal way to think about conditional convergence is to ask the question: If those alternating signs weren't there, would this series converge?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692352660529, "lm_q1q2_score": 0.8262059552218763, "lm_q2_score": 0.845942439250491, "openwebmath_perplexity": 197.03254590247064, "openwebmath_score": 0.9396293759346008, "tags": null, "url": "https://math.stackexchange.com/questions/2828692/conditionally-convergence-sum-limitsn-1-infty-1n-frac-ln-nn" }
c, console, makefile Add missing dependencies The iso image is dependent on the configuration file as well as the kernel image, so I'd add that file to the Makefile rule. Specify flags using standard variables The compiler uses CFLAGS and the assembler uses ASFLAGS by default. Set those variables and simplify your Makefile. Reorder your targets Remember that the first target is the default one run if make is invoked with no arguments. For that reason, I'd recommend that the iso image file rule, which is the most derived rule that is a real target, should be first, followed by the target for the kernel, followed by the .PHONY targets. Create a list of objects Best practice for a project like this is to use a variable for the created objects like this: OBJECTS = boot.o kernel.o string.o vga.o terminal.o
{ "domain": "codereview.stackexchange", "id": 36215, "lm_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, console, makefile", "url": null }
c, database, circular-list, embedded * Notes: 1. Module hasn't been tested for the STRING data type. */ /* *==================== * Includes *==================== */ #include <stdio.h> #include <string.h> #include "atmel_start.h" #include "Bucket.h" //#include "INIconfig.h" /* For debug purposes */ const char* cvaluetypes[] = {"UINT16", "STRING"}; /* *==================== * static/global vars *==================== */ // Stores the registered feed cbucket_t *registeredFeed[BUCKET_MAX_FEEDS]; const uint8_t unixTimeSlot = 0xFF; //virtual time slot // Bucket memory for edge storage and pointers to keep track or reads and writes uint8_t cbucketBuf[BUCKET_SIZE]; uint8_t *cBucketBufHead = &cbucketBuf[0]; uint8_t *cBucketBufTail = &cbucketBuf[0]; /* *==================== * Fxns *==================== */ int8_t _RegisteredFeedFreeSlot(void); void _PrintFeedValue(cbucket_t *feed);
{ "domain": "codereview.stackexchange", "id": 40696, "lm_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, database, circular-list, embedded", "url": null }
python, performance, simulation, physics def key_op(particle, cell_size): return int(particle[0] / cell_size), int(particle[1] / cell_size), int(particle[2] / cell_size) def key_hobo(particle, cell_size): return tuple(coordinate // cell_size for coordinate in particle) def key_op_edit(particle, cell_size): """This was taken from your edit that was rolled back due to answer invalidation""" return floor(particle[0] / cell_size), floor(particle[1] / cell_size), floor(particle[2] / cell_size) HoboProber already sneakily introduced floor division (think \\) to you, so the explicit version of this is also up for discussion: def key_floor_div(particle, cell_size): return particle[0] // cell_size, particle[1] // cell_size, particle[2] // cell_size
{ "domain": "codereview.stackexchange", "id": 35081, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, simulation, physics", "url": null }
javascript, jquery, validation, form, html5 -ms-flex-pack: start; align-items: center; justify-content: flex-start; } .inline-always input:not([type=radio]), .inline-always select { margin-top: 0; margin-bottom: 0; } .inline-always .inline { margin-bottom: 0 }
{ "domain": "codereview.stackexchange", "id": 33062, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, validation, form, html5", "url": null }