text
stringlengths
1
1.11k
source
dict
quantum-mechanics, quantum-interpretations You can be realist or not. And when you are a realist you can be careless about what you choose to be realist about, up until you have a completely deterministic theory but if you then start carelessly being a realist further you risk being inconsistent. So you have to restrain yourself. If you are not a realist then you can be a non realist pretty much without restraint.
{ "domain": "physics.stackexchange", "id": 26345, "lm_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-interpretations", "url": null }
python, beginner time.sleep(4) print" " print" " print "A) yes" print "B) No" repeat = raw_input("Want to try another?: ") time.sleep(1) main()
{ "domain": "codereview.stackexchange", "id": 16100, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner", "url": null }
thermodynamics, heat, combustion, ozone Title: Can water be ignited in an ozone atmosphere? According to my calculations, the reaction $\ce{H2O + O3 -> H2O2 + O2}$ should be favourable under standard conditions. However, I am told that the reaction is probably very slow in solution since ozone is poorly soluble in water and the reaction occurs through a radical mechanism. Water can be ignited in a fluorine atmosphere. Can water also be ignited in an ozone atmosphere? Can this be done at 1 atm? We are basically talking about a derivation of the $\ce{H2/O2}$ system, which involves a radical mechanism. You maybe want to have a look at this answer of mine going a bit more into detail. The reaction you are interested about is only a total sum of reactions and is most likely not to occur as other reactions will be favourable. Ozone itself is not a very stable compound and many other molecules may actively catalyse decomposition. There are various publications[1-3] on the mechanism of this reaction: \begin{align}\ce{
{ "domain": "chemistry.stackexchange", "id": 1208, "lm_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, heat, combustion, ozone", "url": null }
newtonian-mechanics, classical-mechanics, rotational-dynamics, reference-frames, coordinate-systems Edit: if it's still not clear what I'm struggling with: It is the statement that Euler's equation, for example, is with respect to an inertial frame of reference, but with respect to coordinate axes fixed with a rotating body. How is it not a contradiction? Aren't the axes variant with time as rotation, making the reference point from there non-inertial? This is a problem I've struggled with before. The issue is that most textbooks are not clear enough in their definitions of the fixed and rotating reference frames. I've tried to be as comprehensive as possible in my answer, I hope it helps!
{ "domain": "physics.stackexchange", "id": 70819, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, classical-mechanics, rotational-dynamics, reference-frames, coordinate-systems", "url": null }
c#, logging, dependency-injection, ninject The configuration <targets> <target name="database" type="Database"> <connectionString> Data Source=dbinstance;Initial Catalog=database;User Id=userid;Password=userpass;Application Name=TheLogger </connectionString> <commandText> insert into dbo.nlog (log_date, log_level_id, log_level, logger, log_message, machine_name, log_user_name, call_site, thread, exception, stack_trace, full_exception_info) values(@timestamp, dbo.func_get_nlog_level_id(@level), @level, NULL /*@logger*/, @message, @machinename, @username, NULL /*@call_site */, @threadid, @log_exception, @stacktrace, @FullExceptionInfo); </commandText> <parameter name="@timestamp" layout="${longdate}"/> <parameter name="@level" layout="${level}"/> <parameter name="@logger" layout="${logger}"/> <parameter name="@message" layout="${message}"/> <parameter name="@machinename" layout="${machinename}"/>
{ "domain": "codereview.stackexchange", "id": 32660, "lm_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#, logging, dependency-injection, ninject", "url": null }
equilibrium Title: How to use the "equilibrium favors reactants" symbol in Microsoft Word? Is there a Unicode symbol or any other way to insert the symbols "equilibrium favors reactants" and "equilibrium favors products" as text? I have been looking online for a while and found nothing useful. Turning my comments into an answer: I assume you're referring to the symbols $\ce{<=>>}$ and $\ce{<<=>}$. I don't believe these are included in unicode, but there are some similar ones that I believe are IUPAC acceptable replacements, which use full arrows instead of harpoons. These are unicode 2942: ⥂ unicode 2943: ⥃ unicode 2944: ⥄ An alternative is to use a LaTeX package such as mhchem.
{ "domain": "chemistry.stackexchange", "id": 16946, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "equilibrium", "url": null }
lagrangian-formalism, field-theory, fermions, dirac-equation -i\partial_3& -i\partial_1 -\partial_2 & - i\partial_0 -m &0 \\ -i\partial_1 +\partial_2 & i\partial_3 & 0 & -i\partial_0 -m \end{pmatrix}.$$ Now we have $\psi = \begin{pmatrix} a\\ b\\ c\\ d \end{pmatrix}$ where each component is complex. We have that $\psi^\dagger = \begin{pmatrix} a^* &b^* & c^* & d^* \end{pmatrix}$ and $\bar \psi = \psi^\dagger \gamma^0$. Thus, to write the Dirac equation explicitly, first act on $\psi$ with the messy matrix we computed. Then you act on the resultant column with $\gamma^0$. Finally, you take the dot product with $\psi^\dagger$.
{ "domain": "physics.stackexchange", "id": 68299, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism, field-theory, fermions, dirac-equation", "url": null }
erlang molehill_respond:respond_error( <<"MissingKey">>, erlang:iolist_to_binary( [<<"Key \"">>, Key, <<"\" does not exist in passed data">>]), 400, Req2, State); error:{error, Label, Message, Status} -> molehill_respond:respond_error(Label, Message, Status, Req2, State) end.
{ "domain": "codereview.stackexchange", "id": 32400, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "erlang", "url": null }
matlab, noise, signal-power, signal-energy, thresholding \end{cases}\\ &=\begin{cases} 0 & v < 0\\ F_{Z_k}\left( \sqrt v \right) - F_{Z_k}\left( -\sqrt v \right) & v\ge 0 \end{cases} \end{align} with a mean $E\left(\lvert Z_k \rvert^2\right) > 0$ (a absolute square is always larger than zero, unless the original variable is 0, and I'd guess this is not a case you care about, because it means "noiseless"). With a little more derivation it's possible to show that the expectation of the random variable $\lvert Z_k\rvert^2$ is the variance of the random variable $Z_k$, i.e. the actual noise power $\sigma_Z^2$; the variance of $\lvert Z_k\rvert^2$ is twice that, at least for Gaussian $Z_k$. Now, the cdf of that $S_i$ is simply: \begin{align} F_{S_i}(p) &:= P(S_i \le p)\\ &=P\left(\sum_{k=i\cdot L}^{i\cdot (L+1)-1}\frac 1L \lvert Z_k \rvert^2 \le p \right)\\ S_i &\overset{\text{CLT}}\sim \mathcal N\left(E\left( \lvert Z_{iL} \rvert^2 \right);
{ "domain": "dsp.stackexchange", "id": 9846, "lm_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, noise, signal-power, signal-energy, thresholding", "url": null }
image-processing, discrete-signals, frequency, time-frequency UPDATE (17-Feb-14) Question : How do you relate that we require both spatial (time) and frequency information in an image at a same time ? Answer : Me too, had the same question before, so after seeing your comment, I thought I should find one example (I haven't studied wavelets in the context of images before wavelets). And below explanation is the summary of an answer in Quora.com (all credits to that author, Ron Reiter) which I felt as a good example. You might be knowing that we use the DCT for jpeg compression of images. It preserves the low frequency data while throws away some of the high frequency data in the images, based on the image quality we need.Or in other words, this method is good with low frequency data, but not that accurate with high frequency data. For example, in an image with sky and a tree, the areas of sky will be preserved accurately while some details of tree will be thrown off.
{ "domain": "dsp.stackexchange", "id": 1524, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, discrete-signals, frequency, time-frequency", "url": null }
makefile AR := ar # The archiver to use to consolidate the object files into one library. ARFLAGS := -rcs # Options to be passed to the archiver. SOURCE_FILES := $(shell find Source -type f -name *.cpp) # Because it's inconvenient to maintain an up-to-date list of all the source files # that should be compiled, we just search for all .cpp files in the project OBJECT_FILES := $(SOURCE_FILES:.cpp=.o) .PHONY: Default # The default target, which doesn't actually do anything except give the user instructions, # can be called even if nothing needs to be updated. .INTERMEDIATE: %.o # Specifying the object files as intermediates deletes them automatically after the build process. # Rules # Default: @echo "Please specify a target, or use \"All\" to build all targets. Valid targets:" @echo "$(TARGETS)" All: $(TARGETS) lib%.a: $(OBJECT_FILES) $(AR) $(ARFLAGS) $(TARGET_DIRECTORY)/$@ $(OBJECT_FILES)
{ "domain": "codereview.stackexchange", "id": 452, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "makefile", "url": null }
data, and then take the maxima of the density estimate to get the mode. Which country has the country code 35? The answer isn't what you might expect. the analysis became questionable. We present an unsupervised method to detect anomalous time series among a collection of time series. The mathematical representation of the Gaussian kernel is: Now, you have an idea about how the kernel density estimation looks like, let’s take a look at the code behind it. R Spatial Kernel Density Estimation. density: Kernel Density Estimation. First, we performed a side-by-side comparison of KDE with a previously published meta-analysis that applied activation likelihood estimation, which is the predominant approach to meta-analyses in. Kernel density estimation is a fundamental data smoothing problem where inferences about the.
{ "domain": "gemsnroll.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759654852754, "lm_q1q2_score": 0.8195057291394147, "lm_q2_score": 0.8354835452961425, "openwebmath_perplexity": 845.7672518412246, "openwebmath_score": 0.5653823018074036, "tags": null, "url": "https://gemsnroll.de/kernel-density-estimation-code.html" }
opencv To give you an understanding of how many nodes are usually running on a system...a PR2 runs in the ballpark of 150 nodes. These nodes include camera drivers, servo drivers, navigation algorithms, laser drivers. A Turtlebot2 runs around half that. Not saying there's a target number for a given robot or application, but trying to give you a feel of the granularity of nodes.
{ "domain": "robotics.stackexchange", "id": 16031, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "opencv", "url": null }
php, ajax, database, sqlite $q .= " Model='$model'"; } // if any for sale status chosen, skip WHERE clause $pos = strpos($forsale, 'Any'); if ($pos === false) { if ($addwhere == false) { $q .= " AND"; } else { $q .= " WHERE"; $addwhere = false; } $q .= " ForSale='$forsale'"; } $response = $db->query($q); // generate the output table $output = "<table id='screens' class='table tablesorter table-condensed table-striped table-hover table-bordered'>"; $output .= "<thead><tr><th>MANUFACTURER</th><th>MODEL</th><th>FOR SALE</th></tr></thead>"; while ($res = $response->fetchArray()) { $id = $res['Id']; $txtMfr= $res['Manufacturer']; $txtModel= $res['Model']; $txtForSale = $res['ForSale']; $output .= "<tr class='vehiclerow'><td style='display:none' class='id_row'>$id</td><td>$txtMfr</td><td>$txtModel</td><td>$txtForSale</td><td class='status_cell'>$status</td></tr>"; } $output .= "</table>"; echo $output;
{ "domain": "codereview.stackexchange", "id": 4086, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, ajax, database, sqlite", "url": null }
algorithms, graphs, search-algorithms, trees, weighted-graphs If the tree is unrooted, pick an arbitrary node as root. Traverse the tree in postorder and for each node: 2.1. Find the longest and second longest path ending in the current node by maximizing over all children and extending the longest path ending in the child by the edge between parent and child. If there are no two children that result in paths of positive length, set the second longest (and if necessary also the longest) path as starting and ending here (length 0). 2.2. Find the longest path in the subtree that starts at the current node by maximizing over the longest paths in all subtrees below the current one and the path resulting from joining the two paths found in the previous step. Now the longest path in the subtree started at the root is the one you are looking for.
{ "domain": "cs.stackexchange", "id": 3019, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, search-algorithms, trees, weighted-graphs", "url": null }
special-relativity, spacetime, inertial-frames Title: Minkowski diagrams when $\beta\to 1$ I was reading about Minkowski diagrams in Morin's Introduction to Classical Mechanics, pg.537, and was not able to understand a particular ratio. He showed that a point $(x',ct')=(0,1)$ is at a distance $\gamma\sqrt{1+\frac{v^2}{c^2}}$ from the origin whose derivation made sense. So he next shows the relation between one $ct'$ unit and one $ct$ unit as: $$\frac{one \ ct'\ unit}{one \ ct\ unit}=\sqrt{\frac{1+\beta^2}{1-\beta^2}}$$ I believe this is the scaling factor, so from this when $\beta\to1$, that is when it approaches the speed of light the scaling factor is infinite, what does this mean intuitively? On a position vs time graph (a Spacetime diagram), the point $(x', ct')=(0,1)$ lies on a hyperbola centered at the origin and physically represents "one tick" of an inertial astronaut's watch, where the astronaut travels with velocity $v=\beta c$. That point (event P) on the hyperbola can be written as $$(\gamma v/c, \gamma)
{ "domain": "physics.stackexchange", "id": 79430, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, spacetime, inertial-frames", "url": null }
ros Originally posted by ahendrix with karma: 47576 on 2014-07-03 This answer was ACCEPTED on the original site Post score: 3 Original comments Comment by ROSkinect on 2014-07-04: I don't want courses in pointer, my question was how we can use pointer to access to pixel. Anyway thank you Comment by ahendrix on 2014-07-04: The sample you posed uses pointer arithmetic to access the value of each pixel in row-major order. Comment by ROSkinect on 2014-07-04: and what about the cols ? because as I know the image is like a two dimension table we can access to each pixel via i,j.. but using pointer I can't see clearly how we do that ! Comment by Wolf on 2014-07-04: Same as in the question you asked here http://answers.ros.org/question/173933/accessing-pixel-image-c/ ptr_img_A = cv_ptr->image.ptr(i); Gives you a pointer to the first element in the i'th row. ptr_img_A++ changes ptr_img_A from pointing to one column to pointing the next column...
{ "domain": "robotics.stackexchange", "id": 18498, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
javascript, mongodb, express.js, modules, ecmascript-8 // Express router const router = express.Router(); // Display Dashboard router.get('/', dashboardController.displayDashboard); // Render add Post Form router.get('/addpost', dashboardController.addPostForm); // Add Post router.post('/post/add', imageUploader.upload, validator.addPostCheck, dashboardController.addPost); // Edit Post router.get('/post/edit/:id', dashboardController.editPost); // Update Post router.post('/post/update/:id', imageUploader.upload, validator.addPostCheck, dashboardController.updatePost); // Delete Post router.delete('/post/delete/:id', dashboardController.deletePost); // Display Categories router.get('/categories', categoriesController.showCategories); // Render add Categories Form router.get('/categories/addcategory', categoriesController.addCategoryForm); // Add Category router.post('/category/add', validator.addCategoryCheck, categoriesController.addCategory); // Edit Post router.get('/category/edit/:id', categoriesController.editCategory);
{ "domain": "codereview.stackexchange", "id": 39744, "lm_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, mongodb, express.js, modules, ecmascript-8", "url": null }
python numCenters = int(raw_input('Number of data centers: ')) input = {} print("Input data set information as: x y z") # Grab dataset ID information from stdin for x in range(1, numCenters+1): dataSet = raw_input("Data set %s: " % (x)) input[x] = sorted(map(int, dataSet.split())) #Map datasets (the numbers / dataset ID) to data centers (the individual lists) that they belong to #New dictionary for the map alldatasets = {} for k,v in input.iteritems(): for dataset in v: # if dataset not in alldatasets: alldatasets[dataset] = [] # Make a dictionary with the key as the dataset ID, alldatasets[dataset].append(k) # and the value as a list of which datacenters have that value. allsets = list(alldatasets.keys())
{ "domain": "codereview.stackexchange", "id": 11055, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
general-relativity, gravity, differential-geometry, geodesics In fact, I can think of a situation where gravity could have a diverging effect (please let me know if this part should be a separate question). Consider two neighboring test particles heading in the general direction of a planet, with impact parameters $b$ and $b + \delta b$: one of them will pass closer to the planet than the other. Then the closer particle will be deflected more than the farther particle, so that their trajectories will diverge as they pass near the planet. Does this not contradict the Raychaudhuri equation? Or, if it doesn't, doesn't this example show that gravity can be attractive and yet have a diverging effect? There is a nice introduction to the Raychaudhuri equation in the paper On the Raychaudhuri equation by George Ellis, Pramana Vol. 69, No. 1, July 2007 ${}^1$. He gives the following intuitive explanation of how it shows the attractive nature of gravity: Ellis gives the equation in the form:
{ "domain": "physics.stackexchange", "id": 48256, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, gravity, differential-geometry, geodesics", "url": null }
Total Expected Time $=\frac{1}{5}*3 + \frac{4}{5}*10.5 = 9$ minutes. Number of Rounds Solution:  My initial computation of the number of rounds was actually correct–despite the comment from “P” in my last post–but I think the explanation could have been clearer.  I’ll try again. One round is obviously required for the first choice, and in the $\frac{4}{5}$ chance the siblings don’t match, let N be the average number of rounds remaining.  In Stage 2, there’s a $\frac{1}{5}$ chance the trial will end with the next choice, and a $\frac{4}{5}$ chance there will still be N rounds remaining.  This second situation is correct because both the no time added and time added possibilities combine to reset Table 2 with a combined probability of $\frac{4}{5}$.  As before, I invoke self-similarity to find N. $N = \frac{1}{5}*1 + \frac{4}{5}*N \longrightarrow N=5$ Therefore, the expected number of rounds is $\frac{1}{5}*1 + \frac{4}{5}*5 = 4.2$ rounds.
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137937226358, "lm_q1q2_score": 0.8005695518386743, "lm_q2_score": 0.8152324915965392, "openwebmath_perplexity": 1426.7588658187437, "openwebmath_score": 0.6211270093917847, "tags": null, "url": "https://casmusings.wordpress.com/tag/probability/" }
machine-learning, neural-network, scikit-learn, mlp, dropout Parameters ---------- activations : list, length = n_layers - 1 The ith element of the list holds the values of the ith layer. dropout_mask : list, length = n_layers - 1 The ith element of the list holds the dropout mask for the ith layer. """ dropout_masks has a default of None so that MLPDropout can be used exactly like MLPClassifier if you wish to have a dropout of zero. Assuming you are using Dropout, the dropout_masks are applied within _forward_pass by adding the following code to the forward pass for loop: # Apply Dropout Mask (DROPOUT ADDITION) if (i + 1) != (self.n_layers_ - 1) and dropout_masks != None: check1 = activations[i].copy() activations[i+1] = activations[i+1] * dropout_masks[i+1][None, :]
{ "domain": "datascience.stackexchange", "id": 11368, "lm_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, neural-network, scikit-learn, mlp, dropout", "url": null }
electronics, signal-processing etc. In theoretical books, not in practice, these dependencies are just ignored, and to simplify argument $k$ can also be dropped when performing the simplest idealized linear system (receiver) analysis.
{ "domain": "physics.stackexchange", "id": 64531, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electronics, signal-processing", "url": null }
physical-chemistry, thermodynamics, temperature The energy argument is even more ridiculous. We don't have to remove all energy, but only the kinetic energy. The $E=mc^2$ part remains there, so the mass is never going anywhere. All that being said, there is no physical law forbidding the existence of matter at absolute zero. It's not like its existence will cause the world to go down with error 500. It's just that the closer you get to it, the more effort it takes, like with other ideal things (ideal vacuum, ideally pure compound, crystal without defects, etc). If anything, we're doing a pretty decent job at it. Using sophisticated techniques like laser cooling or magnetic evaporative cooling, we've long surpassed the nature's record in coldness.
{ "domain": "chemistry.stackexchange", "id": 7701, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, thermodynamics, temperature", "url": null }
thermodynamics So let's take some example like a bottle of milk. If you want to heat it quickly that's pretty easy because it's easy to generate a large temperature difference on the hot side. Just burn some gas. However to cool the milk quickly we need to generate a large temperature difference on the cool side, and that's hard. You mention liquid nitrogen, and indeed that's a good way to cool things quickly. However you're forgetting all the hours the liquid nitrogen supplier had to put in to cool nitrogen enough to make it liquify. In general it's hard to cool things quickly unless you cheat and start with something (like liquid nitrogen) that's already been cooled. Response to comment: This started as a comment, but it got a bit involved so I thought I'd put it in here. The temperature of anything (e.g. milk) depends on how much heat it contains. Let's not get into exactly what heat is, but basically if you add heat it increases the temperature and if you remove heat it reduces the temperature.
{ "domain": "physics.stackexchange", "id": 5497, "lm_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", "url": null }
python, numpy, matplotlib sns.set(font_scale = 1.5, style = "white") fig, ax = plt.subplots(figsize = (8, 6)) xs = np.arange(len(df)) colors = plt.cm.Greens(np.linspace(0.1, 0.6, 5)) for lower, upper, color in zip([f'pct0.{i}' for i in range(1, 5)], [f'pct0.{i}' for i in range(9, 5, -1)], colors): ax.fill_between(xs, df[lower], df[upper], color = color, label = lower + '-' + upper) ax.plot(xs, df['pct0.5'], color = 'black' , lw = 1.5, label ='Median') ax.set_xticks(xs) ax.set_xticklabels(df['Time'], fontsize = 11) ax.margins(x = 0) ax.set_ylim(ymin = 0) for sp in ['top', 'right']: ax.spines[sp].set_visible(True) plt.xticks(rotation = 90) plt.yticks(fontsize = 11) plt.title('WT & PV Spring 2016', fontsize = 15) plt.ylabel('Energy MWh', fontsize = 12) plt.xlabel('Time', fontsize = 12) plt.ylim([0, 3200]) plt.show()
{ "domain": "codereview.stackexchange", "id": 42840, "lm_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, matplotlib", "url": null }
python, python-3.x, homework, math-expression-eval The code: def infix_brackets_eval(data): Stack = Stack() i = 0 ret = 0 while i < len(data): if data[i] != ' ': if data[i] not in '+-*/()': temp = 0 while data[i] != ' ' and data[i]!= ')': temp = temp * 10 + int(data[i]) i+=1 i-=1 elif data[i] == ')': B = Stack.peek() Stack.pop() x = Stack.peek() Stack.pop() A = Stack.peek() Stack.pop() if Stack.peek() == '(': Stack.pop()
{ "domain": "codereview.stackexchange", "id": 42405, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, homework, math-expression-eval", "url": null }
quantum-field-theory, energy, renormalization, conventions Title: What is precisely the energy scale of a process? Coupling constants run with the energy scale $\mu$. But what is exactly this energy scale. My question is, if I have a physical process, how do I compute $\mu$? There are at least two answers possible to give, but both, in the end, amount to the same thing: There is no "right" way to fix the energy scale of a process, but that doesn't matter, except that your perturbation theory will probably break if you choose the scale badly. The old answer: The renormalization scale is arbitrarily defined to fix some parameters of the theory to measured values and get rid of infinities, e.g. a $\phi^4$ scalar coupling $\lambda$ is sometimes fixed by looking at the $\phi^4$ interaction at the channel $s^2 = 4\mu^2, t^2 = 0, u^2 = 0$, but you could as well look at the channel at $s^2=t^2=u^2=\mu^2$. We need to just take any kind of condition to fix our counterterms and get finite answers for our amplitudes.
{ "domain": "physics.stackexchange", "id": 21510, "lm_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, energy, renormalization, conventions", "url": null }
java, console StaticFunctions.java import java.util.List; import java.util.ArrayList; public abstract class StaticFunctions { public static boolean equalsOneOf(String str, List<String> strList, boolean ignoreCase) { for (String strFromList : strList) { if (strFromList.equals(str)) { return true; } } return false; } } flashcards.csv Wort;Lernwort;Wortart;Beispielsatz;Kategorie run;laufen, rennen;Verb;They run into the forrest.;3 home;Haus;Substantiv;I go home.;4 Overall looks and works well. Nice job! Some minor things that could be improved... Flashcard.java Looks like everything except for the category field could be declared as final Avoid string concatenation in a StringBuilder Main.java The scanner can be declared as final StaticFunctions.java Looks like the ArrayList class can be removed from the imports Also looks like parameter ignoreCase isn't used TrainingSession.java
{ "domain": "codereview.stackexchange", "id": 44947, "lm_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, console", "url": null }
• Sort stack """ Sort Stack: (Under stacks) Write a function that takes in an array of integers representing a stack, recursively sorts the stack in place (i.e., doesn't create a brand new array), and returns it. The array must be treated as a stack, with the end of the array as the top of the stack. Therefore, you're only allowed to: Pop elements from the top of the stack by removing elements from the end of the array using the built-in .pop() method in your programming language of choice. Push elements to the top of the stack by appending elements to the end of the array using the built-in .append() method in your programming language of choice. Peek at the element on top of the stack by accessing the last element in the array. You're not allowed to perform any other operations on the input array, including accessing elements (except for the last element), moving elements, etc.. You're also not allowed to use any other data structures, and your solution must be recursive.
{ "domain": "paulonteri.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813501370535, "lm_q1q2_score": 0.8218225111577803, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 6090.381773024074, "openwebmath_score": 0.30743175745010376, "tags": null, "url": "https://dsa.paulonteri.com/Data%20Structures%20and%20Algorithms%2016913c6fbd244de481b6b1705cbfa6be/Recursion%2C%20DP%20%26%20Backtracking%20525dddcdd0874ed98372518724fc8753.html" }
python, file-system Rather than using if not recursive: break I'd filter the input to the loop. I wouldn't build a groups intermarry list. As you're doubling the amount of memory you're using for no viable gain. I'd merge your duplicates and sizes_dict code into a loop. And so they are the same variable. This is as you're doing the same thing over both the things. And carrying on the way you are no is hard to extend. I would use pathlib so that you have an easier to use object, than a string. I changed your code, however didn't implement all of it. I find sort_duplicates to be quite confusing, and so left that as it is. Below are my changes: import functools import os import pathlib def chunk_file(file_path, chunk_size=None): with open(file_path) as file: if chunk_size is None: chunk_size = file._CHUNK_SIZE while True: data = file.read(chunk_size) if not data: break yield data
{ "domain": "codereview.stackexchange", "id": 29619, "lm_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, file-system", "url": null }
As Mike Earnest confirmed in the comments, your work is correct. As I commented, and you've stated it's likely the case, the WolframAlpha results of $$[x^0]=1$$, $$[x^1]=-12$$, $$[x^3]=-160$$ probably come from the coefficients in the power expansion of $$(1-2x)^6$$ instead. You can see this directly from the first, second & fourth terms in your second last highlighted line, i.e., $$=1-12+60-160$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147185726375, "lm_q1q2_score": 0.8082157329767493, "lm_q2_score": 0.8311430478583168, "openwebmath_perplexity": 421.3833637249228, "openwebmath_score": 0.8142778277397156, "tags": null, "url": "https://math.stackexchange.com/questions/3235077/find-the-coefficient-of-the-power-series-x31-x-11-2x6" }
turing-machines, automata, undecidability, halting-problem, linear-bounded-automata Title: Why is the halting problem decidable for LBA? I have read in Wikipedia and some other texts that The halting problem is [...] decidable for linear bounded automata (LBAs) [and] deterministic machines with finite memory.
{ "domain": "cs.stackexchange", "id": 13740, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, automata, undecidability, halting-problem, linear-bounded-automata", "url": null }
newtonian-mechanics, newtonian-gravity, orbital-motion, planets, centrifugal-force $^1$You have a similar scenario if you swing a rock tied to a line around your head; here the centripetal acceleration is just provided by the string's tension rather than gravity. $^2$Although in general relativity, this won't happen instantaneously, as any perturbation of space only propagate at the speed of light.
{ "domain": "physics.stackexchange", "id": 28923, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, newtonian-gravity, orbital-motion, planets, centrifugal-force", "url": null }
python, wavelet, transform, local-features Title: Feature extraction/reduction using DWT For a given time series which is n timestamps in length, we can take Discrete Wavelet Transform (using 'Haar' wavelets), then we get (for an example, in Python) - >>> import pywt >>> ts = [2, 56, 3, 22, 3, 4, 56, 7, 8, 9, 44, 23, 1, 4, 6, 2] >>> (ca, cd) = pywt.dwt(ts,'haar') >>> ca array([ 41.01219331, 17.67766953, 4.94974747, 44.54772721, 12.02081528, 47.37615434, 3.53553391, 5.65685425]) >>> cd array([-38.18376618, -13.43502884, -0.70710678, 34.64823228, -0.70710678, 14.8492424 , -2.12132034, 2.82842712])
{ "domain": "dsp.stackexchange", "id": 11376, "lm_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, wavelet, transform, local-features", "url": null }
java, algorithm, graph, iterator Title: Directed graph path enumerator in Java I have this iterator class that expects in its constructor two directed graph nodes, source and target, and upon each next() generates another possible directed path from source to target, that was not generated previously. What comes to algorithm, it is basically a depth-first search. Since the nodes store their children in a sorted set, the path seem to be enumerated in lexicographic order. So, tell me anything that comes to mind. net.coderodde.graph.GraphPathEnumerator: package net.coderodde.graph; import java.util.ArrayList; import java.util.Deque; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.NoSuchElementException; import java.util.Set;
{ "domain": "codereview.stackexchange", "id": 15234, "lm_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, graph, iterator", "url": null }
machine-learning, vc-dimension Title: Classes of circle rims The input space is a unit circle, $\mathcal{X} = \mathbb{S}^1 \subset \mathbb{R}^2$. There is class $\mathcal{F}$ of arcs on $\mathbb{S}^1$, where a point is labeled 1 if it is on the arc, and 0 otherwise. We want to find the VC dimension of $\mathcal{F}$ I think the answer is 2. Any two points can be shattered $(++, -+, +-, --)$. But if we have three points $\{(x_1,y_1),\dots,(x_3,y_3)\}$ that all have the label 1, with radius $r_1 = r_2 = 1$, and $r_3 = 0$, it is impossible to shatter them. Is my intuition correct? In fact, the VC dimension is 3. To show this, we need to show that there is a set of 3 points which is shattered, and that no set of 4 points is shattered. All sets of 3 points behave the same, but for definiteness let us choose three points $x,y,z$ which form the corners of an equilateral triangle. By symmetry, there are only 4 cases to consider:
{ "domain": "cs.stackexchange", "id": 15989, "lm_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, vc-dimension", "url": null }
from sympy. Linear Equations Solver. These characteristics have led SymPy to become a popular symbolic library for the scientific Python ecosystem. Here A doesn’t have to be a square matrix. SymPy, SymEngine and the interface! - SciPy India 2015. SymPy is an open source computer algebra system written in pure Python. SymPy integration, constant term. Solve polynomial and transcendental equations. Number Theory (sympy. These characteristics have led SymPy to become a popular symbolic library for the scientific Python ecosystem. Hi, I'm trying to substitute values into a symbolic 10X10 antisymmetric matrix in an iterative code. 80x faster than dist(x, method = "binary"). Block matrices. Then I reinstalled octave and the python/sympy windows bundle -package. The stated goals of the library are to become a full-featured computer algebra system and to keep a simple code base to promote extensibility and comprehensibility. They are extracted from open source Python projects.
{ "domain": "antplus.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.963779943094681, "lm_q1q2_score": 0.815302352218938, "lm_q2_score": 0.8459424353665381, "openwebmath_perplexity": 1440.1432832397454, "openwebmath_score": 0.5822976231575012, "tags": null, "url": "http://tjwu.antplus.it/sympy-symbolic-matrix.html" }
Finally, a simulation and comparison to the graph of $h$: x = RandomReal[{0, 1}, {4, 10^6}]; x = (x[[1, All]] - x[[4, All]])^2 + 4 x[[2, All]] x[[3, All]]; Show[Histogram[x, {.1}, "PDF"], Plot[h[z], {z, zMin, zMax}, Exclusions -> {1, 4}], AxesLabel -> {"\[Delta]", "Density"}, BaseStyle -> Medium, Ticks -> {{{0, "0"}, {1, "1"}, {4, "4"}, {5, "5"}}, Automatic}]
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924769600771, "lm_q1q2_score": 0.8035576403009771, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 772.0392508118454, "openwebmath_score": 0.7386404871940613, "tags": null, "url": "https://stats.stackexchange.com/questions/144138/whats-the-distribution-of-a-d24bc-where-a-b-c-d-are-uniform-distributi?noredirect=1" }
All inequalities of both chains are equivalent (http://planetmath.org/Equivalent3) since $x$ and $y$ are non-negative.  As for the equalities, the chains are valid with the mere equality signs. Title Heronian mean is between geometric and arithmetic mean Canonical name HeronianMeanIsBetweenGeometricAndArithmeticMean Date of creation 2013-03-22 17:49:14 Last modified on 2013-03-22 17:49:14 Owner pahio (2872) Last modified by pahio (2872) Numerical id 10 Author pahio (2872) Entry type Theorem Classification msc 26B99 Classification msc 26D07 Classification msc 01A20 Classification msc 00A05 Synonym Heronian mean inequalities Related topic ArithmeticGeometricMeansInequality Related topic ComparisonOfPythagoreanMeans Related topic SquareOfSum Related topic Equivalent3 Related topic HeronsPrinciple
{ "domain": "planetmath.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986571747626947, "lm_q1q2_score": 0.813390852067627, "lm_q2_score": 0.8244619350028205, "openwebmath_perplexity": 3207.573392902046, "openwebmath_score": 0.8293139934539795, "tags": null, "url": "https://planetmath.org/HeronianMeanIsBetweenGeometricAndArithmeticMean" }
python, generator Title: Python exception-raising generator function I want my generator function to raise as soon as it can. If I make it yield the elements directly, then the KeyError won't happen until iteration begins. Is the following code the best I can do? def cluster_terminals(self, key): """ Deals with forwarding. """ return_list = self.cluster_map[key] def internal_cluster_terminals(return_list): for x in return_list: if isinstance(x, ClusterTerminal): yield x elif isinstance(x, NodeTerminalMappingName): yield from x.node_terminal.cluster_terminals(x.mapping_name) else: assert False return internal_cluster_terminals(return_list) In terms of raising the KeyError as soon cluster_terminals is called (rather than when its result is iterated), this general pattern is likely the best. There are a couple of other points that bear mentioning, though.
{ "domain": "codereview.stackexchange", "id": 14903, "lm_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, generator", "url": null }
And what I was going to ask you is what's the right word-- well, sort of word, made up word-- for this point x star where the minimum is reached? So it's not the minimum value. It's the point where it's reached. And that's called-- the notation for that point is AUDIENCE: Arg min. GILBERT STRANG: Arg min, thanks. Arg min of my function. And that means the place-- the point where f equals f min. I haven't said yet what the minimum value is. This tells us the point. And that's usually what we're interested in. We're, to tell the truth, not that interested in a typical example and what the minimum value is as much as where is it? Where do we reach that thing? And of course, so this is x min. This is then arg min of my function f. That's the point. And it happens to be in this case, the minimum value is actually 0. Because there's no linear term a transpose x.
{ "domain": "mit.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9883127413158322, "lm_q1q2_score": 0.81704979314677, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 595.9249727745299, "openwebmath_score": 0.7817188501358032, "tags": null, "url": "https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/video-lectures/lecture-22-gradient-descent-downhill-to-a-minimum/" }
algorithm-analysis, time-complexity, multiplication We can do a bit better than that... because the values start out so small, the additions are quite sparse. The first pass' additions really only cost $O(lg(N))$ each, and the second pass' cost $2^1 O(lg(N))$ each, and the i'th pass' cost $O(min(N, 2^i \cdot lg(N)))$ each, but that still all totals out to a terrible $\frac{N^2}{lg(N)}$. How is Schönhage–Strassen making the additions cheap? How much do they cost overall?
{ "domain": "cs.stackexchange", "id": 3075, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm-analysis, time-complexity, multiplication", "url": null }
so, if $\|\nabla f(x) \|^2 < 2\mu\epsilon$, then $f(x) - f(x^*) < \epsilon$, i.e., $x$ is $\epsilon$-suboptimal. But termination is a mysterious thing... In general (under the assumptions you drew) it is not true that we will have $\|x-x^*\|<\epsilon$ if $\| \nabla f(x) \| < \kappa \epsilon$, for some $\kappa > 0$ (not even locally). There might be specific cases where such a bound holds, notwithstanding. Unless you draw some additional assumptions on $f$, this will not be a reliable termination criterion. However, strong convexity is often too strong a requirement in practice. Weaker conditions are discussed in the article: D. Drusvyatskiy and A.S. Lewis, Error bounds, quadratic growth, and linear convergence of proximal methods, 2016. Let $f$ be convex with $L$-Lipschithz gradient and define $\mathcal{B}_\nu^f = \{x: f(x) - f^* < \nu\}$. Let us assume that $f$ has a unique minimiser $x^*$ (e.g., $f$ is strictly convex). Then assume that $f$ has the property
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226260757066, "lm_q1q2_score": 0.8505932228740445, "lm_q2_score": 0.8705972616934406, "openwebmath_perplexity": 172.65927548897878, "openwebmath_score": 0.9520741701126099, "tags": null, "url": "https://math.stackexchange.com/questions/1618330/stopping-criteria-for-gradient-method/1618347" }
c++, object-oriented, game, playing-cards simplifies to: void Game::receiveCardsFromDeck(Player& player, const unsigned int& numberOfCards) { try { player.receive(_deck.dealCards(numberOfCards)); } catch (const NotEnoughCardsException& error) { // will automatically handle the EmptyDeckException too _deck.refill(_pile.releaseAllCardsButFirst()); player.receive(_deck.dealCards(numberOfCards)); } }
{ "domain": "codereview.stackexchange", "id": 31130, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, game, playing-cards", "url": null }
homework-and-exercises, thermodynamics In the process of figuring this out I have realised there are some concepts I am not as sure about as I thought I was. I will give these some thought and possibly start another question about these. Thanks everyone for your help and for reading. Let's break up the process into two steps, which necessarily must happen in sequence--the first step is one in which the reservoir heats the body up from a temperature of 273 K to its own temperature of 363 K, and the second step is one in which the reservoir heats the body from 363 K to 373 K. The first step involves a positive entropy change, so it can happen spontaneously. But then once the body has reached 363 K, is it possible for the body to then spontaneously heat up further to 373 K? Let's repeat your calculation, but with an initial temperature of 363 K: $Q = m * C_{P} * (T_{final} - T_{initial})$ $Q = 1 kg * 4.187 kJ / (kg.K) * (373K - 363K)$ $Q = 41.87 kJ$ $\Delta S_{Universe} = -Q/T + m * C_{P} * ln ( (T_{final} / T_{initial})$
{ "domain": "physics.stackexchange", "id": 18512, "lm_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, thermodynamics", "url": null }
python, python-3.x, signal-processing Keywords: audio: location of the audiofile OR a (samplerate, audiodata) tuple sil_threshold: percentage of the maximum window-averaged amplitude below which audio is considered silent win_size: length of window in sec (audio is cut into windows) ret: the return type; can be one of the following: - "sec": return the number of silent seconds - "frac": return the frac of silence (between 0 and 1) - "amp": return a list of amplitude values (one for each window) - "issil": return an np-array of 0s and 1s (1=silent) for each window - "chunk": return a list of (start, end, is_silent) tuples, with start and end in seconds and is_silent is a boolean """
{ "domain": "codereview.stackexchange", "id": 36177, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, signal-processing", "url": null }
quantum-mechanics, symmetry, group-theory, group-representations For any given $R$, $G(R)$ is a geometrical transformation but it is also, at a simpler level, a linear transformation in a finite-dimensional vector space $V$ with basis $B$, so you can simply represent it by its matrix with respect to this basis. Thus, for example, a rotation by 90° about the $+x$ axis would be represented by the matrix $$ \begin{pmatrix} -\tfrac12&0&0&0&\tfrac12\\ 0&0&0&-1&0\\ 0&0&-1&0&0\\ 0&1&0&0&0\\ \tfrac32&0&0&0&\tfrac12\\ \end{pmatrix}. $$ (Work it out!) The others have given more detail on how this works mathematically - the function $G$ being a representation of the group $\mathrm{SO}(3)$ - but I think that examples of this sort help a lot in visualizing what's going on.
{ "domain": "physics.stackexchange", "id": 19395, "lm_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, symmetry, group-theory, group-representations", "url": null }
logic, propositional-logic, loop-invariants, hoare-logic Edit: As pointed out by @chi in the comment, it should be $$\big(S_1 = S_2 \iff (X = \Lambda \land Y = \Lambda \land E = true)\big) \land (X = \Lambda \land Y = \Lambda),$$ which implies (3') $S_1 = S_2 \iff E = true$ as the answer given by @kne shows. There are two ways to answer the question. The first is on the level of propositional logic. You have three statements, $S_1=S_2$, $(X=\Lambda\wedge Y=\Lambda)$, and $E=true$. Let's call them $A$, $B$, and $C$ for short. (2) is $A\Leftrightarrow(B\wedge C)$ and (3') is $A\Leftrightarrow C$. At point (3') we know $B$. Every assignment of the propositional variables that satisfies $B$ and (2) also satisfies (3'). In other words, at the position (3') we know $(A\Leftrightarrow(B\wedge C))\wedge B$ from which $(A\Leftrightarrow C)$ follows semantically. If the propositional proof system of your choice is complete, the above can also be derived using its rules.
{ "domain": "cs.stackexchange", "id": 10972, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "logic, propositional-logic, loop-invariants, hoare-logic", "url": null }
astrophysics, neutron-star The minimum possible size to gravitationally bind neutron star material is thought to be around $0.15 M_{\odot}$ (see here). The equilibrium electron density (there are always some electrons and protons present in neutron star material) for lower masses is too low to block neutron beta-decay.
{ "domain": "astronomy.stackexchange", "id": 877, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, neutron-star", "url": null }
python, scikit-learn, naive-bayes-classifier, sentiment-analysis The columns of the matrix $X$ are ['car', 'passenger', 'seat', 'drive', 'power', 'highway', 'purchase', 'hotel', 'room', 'night', 'staff', 'water', 'location'] Split the data We will split the data in order to test the accuracy of our model from sklearn.cross_validation import train_test_split X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.3) Apply Naive Bayes from sklearn.naive_bayes import GaussianNB clf = GaussianNB() clf = clf.fit(X_train, y_train) clf.score(X_test, y_test) This gives a result of 1.0 Perfect classification!
{ "domain": "datascience.stackexchange", "id": 3184, "lm_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, scikit-learn, naive-bayes-classifier, sentiment-analysis", "url": null }
ros All poses in your plan (except maybe the last) should have the same yaw value (expressed as a quaternion, of course.) It is the angle of the vector drawn from start_xy to goal_xy. Make sure you passing the correct units to the sine/cosine functions (radians vs. degrees.) If this isn't enough of a hint, you probably need to add some code to your description. Comment by JackFrost67 on 2022-06-23: thanks for the answer. working with quaternions is a pain in the ass, yeah they resolve lots of problems, but yet a pain in the ass For the angle, I calculate it as a delta on y / delta on x, I think that's correct. always use radians.
{ "domain": "robotics.stackexchange", "id": 37791, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
roslaunch Is there a way to stop roslaunch from printing out this summary or otherwise suppress the output while leaving node output intact? No. --no-summary will suppress everything from the summary. Edit: when I said node output I meant the printouts from the nodes themselves (with output=screen), not the list of nodes launched in the summary. Ah. In that case: --no-summary should do what you want. Originally posted by gvdhoorn with karma: 86574 on 2022-11-23 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 38144, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "roslaunch", "url": null }
java, algorithm This makes the parameters foolproof, and also simplifies the constructor. All you need for the pattern and matchStr is .length() and .charAt(). Therefore you shouldn't require a String, considering that any String Validation Why shouldn't an empty pattern legally match an empty string? Dubious optimization The following optimization relies in the fact that every character in the pattern must consume at least one character of the string. if (ptnOutBound > strOutBound) { return false; } Even if it is accurate for your current behaviour of * in the pattern, but it would fail if * meant "zero or more characters" — as it customarily does with shell globs. Therefore, if you use that optimization, it's worth an explanatory comment. Suggested implementation Notice that the object barely carries state: public class SimplePattern { //constants private static final char MATCH_ALL = '*'; private static final char MATCH_ONE = '?';
{ "domain": "codereview.stackexchange", "id": 8884, "lm_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", "url": null }
signal-analysis, linear-systems Following these steps, the delayed version of input signal is $$x((t-m)-4)$$ But what is its response (y1)? Is it $$y(t-4) + x((t-m)-4)$$ $$\text{or}$$ $$y((t-m)-4) + x((t-m)-4)?$$ In other cases, we just shift the function $x(t)$ and leave all other terms as it is but the problem here is, the shifting of $x(t)$ may affect the $y(t)$ and so $y(t-4)$ as well. So, should I shift that term as well or keep it as it is? Let's re-write your difference equation: $$y(t) - y(t-4) = x(t-4)$$ Delaying the input gives the following difference equation for the output $y_1(t)$:$$y_1(t) - y_1(t-4) = x(t-m-4)$$ A delayed response to an input $x(t)$ gives $$y(t-m) - y(t-m-4) = x(t-m-4)$$ From there you can see that $y_1(t)$ and $y(t-m)$ satisfy the same difference equation. The system is therefore indeed time-invariant.
{ "domain": "dsp.stackexchange", "id": 12557, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-analysis, linear-systems", "url": null }
java, tree if(root == null){ return -1; }else{ return Math.max(height(root.left), height(root.right))+1; } } public static void main(String[] args) { Node root1 = new Node(8); // 8 root1.left = new Node(9); // / \ root1.right = new Node(5); // 9 5 root1.left.left = new Node(4); // / / root1.right.left = new Node(1); // 4 1 root1.right.left.left = new Node(3); // / root1.right.left.left.left = new Node(2); // 3 // / // 2
{ "domain": "codereview.stackexchange", "id": 15143, "lm_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, tree", "url": null }
thermodynamics, statistical-mechanics, ideal-gas, approximations Title: Quality of ideal Gas approximation? I know that modeling gases as ideal gases includes two approximations: approximating Particles as points regarding the collisions with macroscopic objects neglecting inter-particle interactions The first approximation seems pretty "harmless", it is the quality of the second approximation im interested in. Under what circumstances can inter-particle interaction be neglected? Especially: Can aerodynamic calculations be done reliably using the ideal gas approximation? Real gases behave as ideal gases at low pressures and high temperatures. The quantitative test is $$Z = \frac{P V}{RT} \approx 1$$ where $Z$ is the comprehensibility factor. To a good approximation $Z$ can be represented in the form of a universal graph for all gases as a function of reduced pressure ($P_r=P/P_c$) and reduced temperature ($T_r=T/Tc$), where $P_c$, $T_c$ are the critical pressure and temperature of the gas:
{ "domain": "physics.stackexchange", "id": 90837, "lm_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, statistical-mechanics, ideal-gas, approximations", "url": null }
You can easily check your solution by using your calculator to compare the original expression with your simple radical form. In Figure 4(a), we’ve approximated the original expression, $$\sqrt{\frac{1}{8}}$$. In Figure 4(b), we’ve approximated our simple radical form $$\frac{\sqrt{2}}{4}$$. Note that they yield identical decimal approximations. Let’s look at another example. Example $$\PageIndex{3}$$ Place $$\sqrt{\frac{3}{20}}$$ in simple radical form. Solution Following the lead from Example 2, we note that $$5 \cdot 20 = 100$$, a perfect square. So, we multiply both numerator and denominator by 5, then take the square root of both numerator and denominator once we have a perfect square in the denominator. $$\sqrt{\frac{3}{20}} = \sqrt{\frac{3}{20} \cdot \frac{5}{5}} = \sqrt{\frac{15}{100}} = \frac{\sqrt{15}}{\sqrt{100}} = \frac{\sqrt{15}}{10}$$
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9911526459624252, "lm_q1q2_score": 0.8302092449775559, "lm_q2_score": 0.8376199653600372, "openwebmath_perplexity": 356.65065799553645, "openwebmath_score": 0.9020271897315979, "tags": null, "url": "https://math.libretexts.org/Bookshelves/Algebra/Intermediate_Algebra_(Arnold)/09%3A_Radical_Functions/9.03%3A_Division_Properties_of_Radicals" }
quantum-gate, textbook-and-exercises Title: Is the mathematical expression between the CNOT gates arranged in this way a tensor product or a concatenated product? Is the mathematical expression between the CNOT gates arranged in this way a tensor product or a concatenated product? That is \begin{matrix} \text{CNO}{{\text{T}}^{\otimes n}} & or & \prod\limits_{n}{\text{CNOT}} \\ \end{matrix}? $CNOT^{\otimes n}$ is a matrix of size $4^n$ and corresponds to the following circuit : $\prod_{i=1}^{n}{CNOT}$ is a matrix of size $2$ and corresponds to the following circuit :
{ "domain": "quantumcomputing.stackexchange", "id": 4207, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-gate, textbook-and-exercises", "url": null }
I think Wolfram-Alpha is right in this case. But technically you're asking it the wrong question. In order for you to state $\forall(x,y)\in B(\delta,0)$, $|f(x,y)|<\delta$, your function $f(x,y)$ has to be defined on a local neighbourhood around the origin. In this case it isn't, as the function is undefined on $x=0$. I think what you need to input into Wolfram Alpha is something along the lines of a multivariable one-sided limit. $$\lim_{x\rightarrow 0^+,y\rightarrow 0} \frac{x\sin\frac{y}{\sqrt{x}}}{x^2 + y^2}$$ Because on the face-of it, I think Wolfram alpha would check if there's any problem areas in a local neighbourhood of the origin. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9626731126558705, "lm_q1q2_score": 0.8293796663225192, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 135.50718147420633, "openwebmath_score": 0.9620891809463501, "tags": null, "url": "http://math.stackexchange.com/questions/10322/multivariable-limit-lim-x-y-rightarrow-0-0-frac-x-siny-sqrtx" }
quantum-mechanics, history, measurement-problem, wavefunction-collapse, decoherence It should indeed not make any difference in the final result if we, e.g., add some part of the measuring device or the whole device to the object and apply the laws of quantum theory to this more complicated object. It can be shown that such an alteration of the theoretical treatment would not alter the predictions concerning a given experiment. This follows mathematically from the fact that the laws of quantum theory are for the phenomena in which Planck's constant can be considered as a very small quantity, approximately identical with the classical laws. But it would be a mistake to believe that this application of the quantum-theoretical laws to the measuring device could help to avoid the fundamental paradox of quantum theory.
{ "domain": "physics.stackexchange", "id": 41582, "lm_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, history, measurement-problem, wavefunction-collapse, decoherence", "url": null }
homework, system-identification is the output of the zero signal zero? For a linear system , $T(\vec{0})=0$. is a single output with a zero coefficient zero? This tests if $T(0.\vec{x})=0.T(\vec{x}) = 0$ is a single output linear? This tests if $T(\alpha.\vec{x})=\alpha.T(\vec{x})$ is a simple addition linear? This tests if $T(\vec{x}+\vec{y})=T(\vec{x})+T(\vec{y})$ Those, if not passed, prove that the system is non-linear. And instead of using the generic version, they can show to your (clever) professor that you have some intuition about what is going on, and the risk of errors is reduced. I personally appreciate a lot when students use minimal arguments: they go straight to the point, spend less time on such questions, to focus on more involved ones. Of course, if the system is linear, more is required. Here, your system is non-linear... unless $b=0$.
{ "domain": "dsp.stackexchange", "id": 6983, "lm_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, system-identification", "url": null }
homework-and-exercises, electromagnetism, magnetic-fields, tensor-calculus Title: Show $2(B \cdot \nabla)B = \nabla |B|^2$ when the B-field is curl-less using summation notation I was able to show for myself that $$ 2(\mathbf{B} \cdot \mathbf{\nabla})\mathbf{B} = \mathbf{\nabla} |\mathbf{B}|^2$$ when $\mathbf{\nabla} \times \mathbf{B} = 0$, but in order to do this, I had to actually write out all the components in regular (e.g. $B_x\frac{\partial B_x}{B_y} + ...$, etc.) This is fine, but I would like to be able to present this in a more compact format (and I'm working on improving my familiarity with summation notation). Is there a way to write this proof in Einstein summation notation? Observe the vanishing components i of $$ \mathbf{B}\times (\nabla \times \mathbf{B})=0, $$ namely $$ 0= B_j \epsilon^{ijk}( \epsilon ^{klm}\partial_l B_m) = (\delta^{il}\delta^{jm}-\delta^{im}\delta^{jl}) B_j \partial_l B_m \tag{z}\\ = B_j \partial_i B_j - B_j \partial_j B_i = \frac{1}{2} \partial_i (B_j B_j)- B_j\partial_j B_i, $$
{ "domain": "physics.stackexchange", "id": 52681, "lm_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, electromagnetism, magnetic-fields, tensor-calculus", "url": null }
4. Originally Posted by mathmari I want to find for the following series the radius of convergence and the set of $x\in \mathbb{R}$ in which the series converges. 1. $\displaystyle{\sum_{n=0}^{\infty}\frac{n}{2^n}x^{n^2}}$ 2. $\displaystyle{\sum_{n=0}^{\infty}\frac{1}{(4+(-1)^n)^{3n}}(x-1)^{3n}}$ For a simple power series $\sum a_nx^n$ the radius of convergence is given by $\frac1R = \lim_{n\to\infty}\Bigl|\frac{a_{n+1}}{a_n}\Bigr|$ (provided that limit exists). But these are not simple power series, because the power of $x$ is not $n$, but $n^2$ in 1., and $3n$ in 2. In 2., there is the additional complication that the variable is not $x$, but $x-1$. So to answer these questions you need to go back to the more general form of the ratio test, which says that a series converges if the limit as $n\to\infty$ of the ratio of the $(n+1)$th term to the $n$th term is less than $1$, and it diverges if that limit is greater than $1$.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995723244552, "lm_q1q2_score": 0.8110986860520097, "lm_q2_score": 0.8397339736884712, "openwebmath_perplexity": 172.87325799561992, "openwebmath_score": 0.9974899888038635, "tags": null, "url": "http://mathhelpboards.com/analysis-50/radius-convergence-20204.html?s=9278ceb6188b675b9c2ddddfeb0e6f5e" }
algorithms, information-theory, lower-bounds, streaming-algorithm The conclusion is false, therefore the premise is false. The proof is by contradiction. This is proved by constructing a compression algorithm that encodes an $L$-length bit string in fewer than $L$ bits. A decoding method is then given for reconstructing the $L$-length bit string. What confuses me is that the paragraph above is apparently the contradiction that proves that you cannot transmit an $L$-length bit string using fewer than $L$ bits. And yet it seems to show that this actually can be done. I understand the counting argument that says you cannot map $2^L$ bit-strings losslessly onto a range of $2^L-1$ outputs. What I need to understand for my class is why the given proof by contradiction is valid. If anyone can help me with the intuition concerning why the proof is valid, I would appreciate it Consider the following argument: If $0 > 1$ then $1 > 2$.
{ "domain": "cs.stackexchange", "id": 11326, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, information-theory, lower-bounds, streaming-algorithm", "url": null }
telescope-lens A Barlow lens is an attachment which fits into the eyepiece holder. It's main purpose is to give increased magnification with your existing eyepieces. They are usually marked as 2x or 3x which indicates how many times they will multiply the magnifying power of an eyepiece. They can be useful for large telescopes which can comfortably handle high powers but for a smaller scope they can be of limited use. The two problems you would encounter if you used one are, first, that the more you magnify an image the fainter it gets, with a smallish diameter scope like yours this means that you will find it very difficult to see faint objects. The other one is the fact that locating and tracking objects as they move (due to the rotation of the earth) becomes much harder as you increase magnification, the field of view of the eyepiece gets much smaller as you increase the power.
{ "domain": "astronomy.stackexchange", "id": 183, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "telescope-lens", "url": null }
quantum-field-theory, parity I think that the moment when Wu got a polarized direction of the emitting electrons from $\text{Co}^{60}$, they should already have concluded a parity violation, and they didn't need to flip the magnetic field. It is because when we put $\text{Co}^{60}$ in a magnetic field, if parity is conserved, then we would expect an emission of electrons on both directions. (If the parity if conserved, one couldn't identify the direction of the magnetic field, thus we expect both directions to have the same amount of electrons. Otherwise we can specify a direction.) Therefore, Wu would conclude a parity violation the first time when they saw the emission of the electrons. But why they needed to switch the magnetic field and do the prediction like in the above picture? A quick run through the experiment:
{ "domain": "physics.stackexchange", "id": 34756, "lm_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, parity", "url": null }
Since logs are defined only for positive inputs, then we can't have a negative value for the argument. When the x was squared, this was fine: even if x is negative, the square of x is positive. However, once the square was taken out front as a "times two", we lost our assurance regarding the sign of x. To keep things "kosher", we have to use absolute-value bars, thus ensuring that the argument of the log remains positive. 5. ## ok.... Originally Posted by stapel A log rule lets you take powers out front as multipliers. This is fine for stuff like: . . . . . $\log(3^4)\, =\, 4\, \log(3)$ In the above, you know that 3 is positive, so it's okay to take the 4 out front as a multiplier. However, in the listed case, a power is being taken off a variable. We don't know whether or not this variable is positive, negative, or zero. (Well, we'll assume it's not zero, since the square of zero, being still zero, is not allowed inside the log.)
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419690807408, "lm_q1q2_score": 0.8014355622112932, "lm_q2_score": 0.8104789109591832, "openwebmath_perplexity": 578.9095783037124, "openwebmath_score": 0.9021478295326233, "tags": null, "url": "http://mathhelpforum.com/pre-calculus/84430-express-f-g-x.html" }
floating-point Take any floating point number x, 1 ≤ x < 4. When the square root is calculated, you get another floating point number y, 1 ≤ y ≤ 2. There are fewer floating point numbers (about half as many) 1 ≤ y ≤ 2 as floating point numbers 1 ≤ x < 4. If you square two numbers y and y', that calculation doesn't know how y and y' were created. So there are about half as many floating point numbers sqr (sqrt (x)), 1 ≤ x ≤ 4, as original numbers in that interval. So for about half the numbers, sqr (sqrt (x)) ≠ x. The other way round, calculating sqrt (sqr (x)), you can probably prove that the result must be equal to x if both operations are calculated with high quality. If the squaring operation produces a relative error epsilon, then the square root operation divides that relative error by two.
{ "domain": "cs.stackexchange", "id": 11861, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "floating-point", "url": null }
optics, visible-light, electromagnetic-radiation, interference, bubbles I know that this is a bit of a simplification because the length of the path depends on the angle of incidence too. The part that I don't understand is that when the film becomes too thin eventually none of the visible wavelengths should cancel out - not all, as written in the text. Is this an error in the text or am I understanding something wrong? The condition for constructive/destructive interference is that the optical path difference, $\Delta$, is a integer multiple of half wavelength. In particular, the destructive interference happens when $\Delta=n\lambda$, for some integer $n$, since the external reflection (air-water interface) gets a phase inversion whereas the internal reflection (water-air interface) does not.
{ "domain": "physics.stackexchange", "id": 40301, "lm_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, visible-light, electromagnetic-radiation, interference, bubbles", "url": null }
quantum-mechanics, homework-and-exercises, schroedinger-equation, potential ODD solutions: $$ \boxed{\psi_{I}= Ae^{\mathcal{K} x}~~~~~~~~\psi_{II}= - \dfrac{A e^{-\mathcal{K}\tfrac{d}{2}}}{\sin\left( \mathcal{L} \tfrac{d}{2} \right)}\, \sin\left(\mathcal{L} x\right)~~~~~~~~ \psi_{III}=-Ae^{-\mathcal{K} x}} $$ When i applied boundary conditions to these equations i got transcendental equation which is: \begin{align} &\boxed{-\dfrac{\mathcal{L}}{\mathcal{K}} = \tan \left(\mathcal{L \dfrac{d}{2}}\right)} && \mathcal L \equiv \sqrt{\tfrac{2mW}{\hbar^2}} && \mathcal K \equiv \sqrt{\tfrac{2m(W_p-W)}{\hbar^2}} \\ &{\scriptsize\text{transcendental eq.} }\\ &\boxed{-\sqrt{\tfrac{1}{W_p/W-1}} = \tan\left(\tfrac{\sqrt{2mW}}{\hbar} \tfrac{d}{2} \right)}\\ &{\scriptsize\text{transcendental eq. - used to graph} } \end{align} Transcendental equation can be solved graphically by separately plotting LHS and RHS and checking where crosssections are. $x$ coordinates of crossections represent possible energies $W$ in finite potential well.
{ "domain": "physics.stackexchange", "id": 7112, "lm_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, homework-and-exercises, schroedinger-equation, potential", "url": null }
c, stack, statistics void minmax_stack_free(minmax_stack* stack) { minmax_stack_node* current_node = stack->top_node; minmax_stack_node* next_node; while (current_node) { next_node = current_node->next_node; free(current_node); current_node = next_node; } stack->compare = NULL; stack->min_node = NULL; stack->max_node = NULL; stack->top_node = NULL; stack->size = 0; } void minmax_stack_push(minmax_stack* stack, void* datum) { int cmp_min; int cmp_max; minmax_stack_node* new_node = malloc(sizeof(*new_node)); new_node->datum = datum; if (stack->top_node) { new_node->next_node = stack->top_node; new_node->min_node = stack->min_node; new_node->max_node = stack->max_node; stack->top_node = new_node; cmp_min = stack->compare(datum, stack->min_node->datum); cmp_max = stack->compare(datum, stack->max_node->datum);
{ "domain": "codereview.stackexchange", "id": 27334, "lm_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, stack, statistics", "url": null }
forces, newtonian-mechanics I don't know where to even start to figure it out. Once gravity gets involved, it throws me off. Any real help would be appreciated, thanks! I'm going to assume that you have a pneumatic ram of some kind, and that it features an area $A$ and a stroke length of $l$ which is very short compared to the other distances in this problem. I further assume that you can connect this device to a high pressure reservoir with a volume much larger than $Al$ (making the force on the ram effectively constant over the stroke) at pressure $P$. Other assumptions:
{ "domain": "physics.stackexchange", "id": 1491, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, newtonian-mechanics", "url": null }
homework-and-exercises, thermodynamics $$2\pi r \ell \dot q = \dot q \ell$$ $$q = \frac{\dot q}{2\pi r}. $$ From Fourier's law of heat conduction, $$\vec q = -k\nabla T = - k\frac{\partial T}{\partial r} \hat r,$$ where $k$ is the thermal conductivity of the cylinder and the second equation uses the axial and azimuthal symmetries. We have $$ \frac{\partial T}{\partial r} = -\frac{\dot q}{2\pi k r}.$$ The solution to this differential equation is $$ T(r) = -\frac{\dot q}{2\pi k} \log\left(\frac r {r_0}\right)$$ where $r_0$ is a constant determined by the outer boundary condition. You will notice that the temperature blows up for $r = 0$. This arises from the fact that an infinitely narrow heat source is an idealization and not very realistic. If you have a time-varying source or boundary conditions, you will need to solve the time-dependent heat equation $$\nabla^2 T - \frac{C_V}{k}\frac{\partial T}{\partial t} = -\frac{\dot q}{k}\delta^2(r)$$ with the relevant boundary conditions. With the symmetries mentioned above,
{ "domain": "physics.stackexchange", "id": 72783, "lm_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, thermodynamics", "url": null }
feature-selection, xgboost Title: How to interpret feature importance (XGBoost) in this case? I found two dominant features from plot_importance. My dependent variable Y is customer retention (whether or not the customer will retain, 1=yes, 0=no). My problem is I know that feature A and B are significant, but I don't know how to interpret and report them in words because I can't tell if they have a position or negative effect on the customer retention. Is there a way to find that out or anything that helps make it clear? Thanks. Pictures usually tell a better story than words - have you considered using graphs to explain the effect? Perhaps 2-way box plots or 2-way histogram/density plots of Feature A v Y and Feature B v Y might work well.
{ "domain": "datascience.stackexchange", "id": 5437, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "feature-selection, xgboost", "url": null }
# If the balloon is subjected to a net uplift 5 If the balloon is subjected to a net uplift force of F = 800 N, determine the tension developed in ropes AB, AC, AD. Image from: Hibbeler, R. C., S. C. Fan, Kai Beng. Yap, and Peter Schiavone. Statics: Mechanics for Engineers. Singapore: Pearson, 2013. #### Solution: We will first write each tension developed in Cartesian vector form. To do so, we need to write the locations of points A, B, C, and D in Cartesian vector form. From the diagram, the locations of the points are: $A:(0i+0j+6k)$ m $B:(-1.5i-2j+0k)$ m $C:(2i-3j+0k)$ m $D:(0i+2.5j+0k)$ m The position vectors for each rope are: $r_{AB}\,=\,\left\{(-1.5-0)i+(-2-0)j+(0-6)k\right\}\,=\,\left\{-1.5i-2j-6j\right\}$ $r_{AC}\,=\,\left\{(2-0)i+(-3-0)j+(0-6)k\right\}\,=\,\left\{2i-3j-6j\right\}$ $r_{AD}\,=\,\left\{(0-0)i+(2.5-0)j+(0-6)k\right\}\,=\,\left\{0i+2.5j-6j\right\}$
{ "domain": "questionsolutions.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754492759499, "lm_q1q2_score": 0.8426500293486263, "lm_q2_score": 0.8558511488056151, "openwebmath_perplexity": 627.5938856489199, "openwebmath_score": 0.8422003388404846, "tags": null, "url": "https://www.questionsolutions.com/balloon-subjected-net-uplift/" }
ros, navigation, amcl int main(int argc, char **argv) { ros::init(argc, argv, "err_eval"); ros::NodeHandle n; ros::Subscriber sub_amcl = n.subscribe<geometry_msgs::PoseWithCovarianceStamped>("amcl_pose", poseAMCLCallback); ros::Rate loop_rate(10); ros::spinOnce(); int count = 0; while (ros::ok()) { geometry_msgs::Pose error; error.position.x = poseAMCLx; error.position.y = poseAMCLy; error.orientation.w = poseAMCLa; pub.publish(error); ros::spinOnce(); loop_rate.sleep(); count=count+1; } return 0; } ` Originally posted by adityakamath on ROS Answers with karma: 30 on 2016-11-14 Post score: 0 Original comments Comment by mgruhler on 2016-11-15: maybe you could also post the errors you are receiving so we at least can guess what the actual problem is? Change your subscriber statement to this: ros::Subscriber sub_amcl = n.subscribe("amcl_pose", 100, poseAMCLCallback);
{ "domain": "robotics.stackexchange", "id": 26239, "lm_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, navigation, amcl", "url": null }
mechanical-engineering, structures, connections In comparison, this one has all 3 rotational degrees of freedom, so is it still a pinned support? Yes it can, and in many designs it should be a pin support along one axis and fixed support along other. In many trusses and bridges that is the case. The design software when defining a joint have the joint degrees of freedom choices. Among those are the option to define the joint a hinge along one axis but fixed along the others. You can even have joints or supports that can have, rigid, pin, or spring or even predefined varying stiffness and ductility restriction on rotation, settlement, lateral displacement, moment transfer. This is becoming more advantageous in seismic design. Where one expects different behavior of a structure under different spectra of earthquake. Between the two extremes of a pin joint and fixed join one can define the semi fixed joint or fixed but after a certain stress behaving like a hinge.
{ "domain": "engineering.stackexchange", "id": 2736, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, structures, connections", "url": null }
performance, array, haskell, image This makes it a tad easier to understand what exactly you do here, IMO You speak of not being able to figure out a way to filter the repa array. A bit of hoogling reveals selectP, which should help with that. They explicitly mention: Produce an array by applying a predicate to a range of integers. If the predicate matches, then use the second function to generate the element. This is a low-level function helpful for writing filtering operations on arrays. Use the integer as the index into the array you're filtering.
{ "domain": "codereview.stackexchange", "id": 27751, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, array, haskell, image", "url": null }
gaussian "This is not a book to be put down lightly; it should be thrown with great force." Be that as it may, Professor Collins is suggesting that a bar plot of the binomial coefficients on the $n$-th row of Pacal's triangle, after suitable normalization, will look from far away like a Gaussian distribution with mean $n/2$ and standard deviation $\sqrt{n}/2$. He then further obfuscates this by using the fact that for even values of $n$, we can write the standard deviation as $\sqrt{k/2}$ where $k = n/2$ while for odd $n$, it is simply $\sqrt{n}/2$, inviting the reader to arrive at the mistaken conclusion that there is a fundamental difference between the odd and even rows. To get a better understanding of where the $n/2$ and $\sqrt{n}/2$ comes from, look for reading material on the DeMoivre-LaPlace approximation which is a special case of the Central Limit Theorem.
{ "domain": "dsp.stackexchange", "id": 1057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gaussian", "url": null }
haskell, parsing data Stmt = SReturn [Expr] | SDecl String String | SBinding String Expr deriving Show type Program = [Stmt] data ParserState = ParserState { _prog :: Program, _exprStack :: [Expr], _opStack :: [Op], _stmtIdent :: String, _stmtParam :: String, _rest :: [Token] } deriving Show $( makeLenses [''ParserState]) data Result a = Error Token | State a deriving Show instance Monad Result where (Error e) >>= _ = Error e (State a) >>= f = f a return = State instance Functor Result where fmap _ (Error t) = Error t fmap f (State a) = State (f a) instance Applicative Result where pure = return (<*>) = ap instance Alternative Result where empty = Error EOF Error _ <|> p = p State x <|> _ = State x epsilon :: ParserState -> Result ParserState epsilon = State
{ "domain": "codereview.stackexchange", "id": 1905, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell, parsing", "url": null }
Also, please let me know how do we handle the above if 'n' is a real number. Thanks Sai Seems right. Below is what you need to know for the GMAT about raising inequalities into a power: A. We can raise both parts of an inequality to an even power if we know that both parts of an inequality are non-negative (the same for taking an even root of both sides of an inequality). For example: $$2<4$$ --> we can square both sides and write: $$2^2<4^2$$; $$0\leq{x}<{y}$$ --> we can square both sides and write: $$x^2<y^2$$; But if either of side is negative then raising to even power doesn't always work. For example: $$1>-2$$ if we square we'll get $$1>4$$ which is not right. So if given that $$x>y$$ then we can not square both sides and write $$x^2>y^2$$ if we are not certain that both $$x$$ and $$y$$ are non-negative.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632261523028, "lm_q1q2_score": 0.8128081514159583, "lm_q2_score": 0.8539127566694178, "openwebmath_perplexity": 1244.8612358506252, "openwebmath_score": 0.637643039226532, "tags": null, "url": "https://gmatclub.com/forum/confirmation-on-some-inequalities-127168.html" }
step-by-step math calculator is said to be able to combine radical terms from under radical. Several very important definitions, which we have used many times in this tutorial, the focus! 5 4 x is said to be able to break down a number to a given power math. Integer, then perform many operations to simplify the radical sign with free! To our Cookie Policy expression can also involve variables as well as numbers rational number which means you. You how to simplify radical expressions with our free step-by-step math calculator contain numbers... The best experience step is to simplify radical expressions with an index of.... Step-By-Step math calculator root of a product equals the product of the and. Under the radical sign for the entire fraction, you agree to our Cookie Policy 4 x. no fractions the. Also you can not combine unlike '' radical terms together, those terms have to the. But you might not be able to break down a number into smaller! Be used to simplify radicals, we will also
{ "domain": "danubecc.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9585377225508371, "lm_q1q2_score": 0.8147294294844329, "lm_q2_score": 0.8499711699569787, "openwebmath_perplexity": 988.5348861387675, "openwebmath_score": 0.6882786154747009, "tags": null, "url": "http://danubecc.org/4de6u/simplify-radical-expressions-8bf37a" }
python Same applies to employee_del_attr(). Field name id shadows built-in id() method and is not used anywhere. Functions such as print_self_employees() that just print stuff are meant to be pure. You don't want to change anything just by looking at it, it's not quantum physics. Then again, self.employees is never used so there is no reason to update it in the first place.
{ "domain": "codereview.stackexchange", "id": 43999, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
special-relativity, mass, inertial-frames, mass-energy Title: Is this relativistic mass? I have seen in a lot of places in here clearly stating that relativistic mass is outdated, that we can make do just fine with the concept of invariant mass,etc. But I've also seen people saying that a hotter object is heavier than a colder object. Where they say that the internal energy of the constituent atoms contribute to the mass of the object. This confuses me. Doesn't relativistic mass imply that I should observe your mass to increase as your velocity increases? Doesn't an increase in internal energy mean an increase in the constituent atom's velocity? But I've also seen people saying that a hotter object is heavier than a colder object. Where they say that the internal energy of the constituent atoms contribute to the mass of the object.
{ "domain": "physics.stackexchange", "id": 57144, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, mass, inertial-frames, mass-energy", "url": null }
and the author continues to use the notation $\binom{n}{k}$ without any more citations, indicating this notation being commonly used. • D. E. Knuth who gave us $\TeX$ is besides being a great mathematician an extraordinary expert in typography and mathematical writing. His Mathematical Typography (1979) gives us a glimpse of his deep thoughts about these issues. Another one being the report Mathematical Writing (1987) written together with T. Larrabee and P. M. Roberts. In $\TeX$ we use the command "$\text{n \choose k}$" giving us $\binom{n}{k}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707953529717, "lm_q1q2_score": 0.8559686254180844, "lm_q2_score": 0.8757869884059267, "openwebmath_perplexity": 772.823877360378, "openwebmath_score": 0.9258873462677002, "tags": null, "url": "https://math.stackexchange.com/questions/2835377/combination-notation-vs-binomial-coefficient-formula" }
c#, performance, xna The next thing I tried was to strip the example down to just simply Vector2 objects, leaving out all of your Human, Enemy, and City types. I used the following code: private static Random random = new Random(); protected override void Update(GameTime gameTime) { // Generate initial list of vectors. List<Vector2> vectors = new List<Vector2>(); for (int index = 0; index < 1000; index++) { vectors.Add(new Vector2(random.Next(800), random.Next(480))); }
{ "domain": "codereview.stackexchange", "id": 4475, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, performance, xna", "url": null }
### Setting Up First, you need something to edit your text and something to compile it to a PDF or whatever other format you like. I personally use Overleaf. It’s a free, online application that lets you type in one column with live updates to what it looks like on the page in the other column. It also has templates, allows collaboration, and has some other nice features that are not important to our purposes here. (Full disclosure: The link is a referral link. If you refer people, you get extra storage space and pro features for free. The default free features and space are fine, though.) There are other popular options. If you need to compile offline, I suggest TeXmaker. If you go this route, you need to download MiKTeX. If you want to write something very long, you may want to type into a text editor and then copy and paste into Overleaf or TeXmaker. (By “long” I mean over fifty pages, give or take based on things like included pictures.)
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575137315161, "lm_q1q2_score": 0.8250869175015055, "lm_q2_score": 0.8397339656668287, "openwebmath_perplexity": 725.4622217622605, "openwebmath_score": 0.8384761214256287, "tags": null, "url": "https://nicholesuomi.wordpress.com/category/mathematics/" }
quantum-mechanics, hilbert-space, probability, born-rule It also turns out that the support of a PVM coincides with the spectrum $\sigma(A)$ of the associated observable. The elements $P$ of $L(H)$ are self-adjoint operators and thus the picture is consistent: $P$ is an elementary observable admitting only two values $0$ (NOT) and $1$ (YES). In fact $\{0,1\} = \sigma(P)$ unless considering the two trivial cases (the contradiction) $P=0$ where $\sigma(P)= \{0\}$ and $P=I$ (the tautology) where $\sigma(P)= \{1\}$.
{ "domain": "physics.stackexchange", "id": 45332, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, hilbert-space, probability, born-rule", "url": null }
algorithms, computational-geometry, graphics Title: How to find the angle of an arc to draw graphic I would like to draw an arc from a specific point to a goal point, during the process of drawing a larger path. I would like to do it using bezier curves, which aren't adequate for modeling circular arcs, but these equations found here seem to potentially estimate the arc pretty well (I can't tell if these equations correctly implement the circular arc using cubic Bezier curves (yet), but it seems like a good start). Here is the equations from that link. start coordinate = { x: R, y: 0 } control point 1 = { x: R, y: R * 4/3 * tan( phi / 4) } control point 2 = { x: R * ( cos(phi) + 4/3 * tan( phi/4 ) * sin(phi) ), y: R * ( sin(phi) - 4/3 * tan( phi/4 ) * cos(phi) ), } end coordinate = { x: R * cos(phi), y: R * sin(phi) } So let's say I start with a drawing of a path composed of some stuff, in this case just a few connected line segments (doesn't matter what they are):
{ "domain": "cs.stackexchange", "id": 13012, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, computational-geometry, graphics", "url": null }
special-relativity, mass, reference-frames, speed, mass-energy Title: Why does an object with higher speed gain more (relativistic) mass? Today, in my high school physics class, we had an introductory class on electromagnetism. My teacher explained at some point that an object with a very high speed (he said it started to get somewhat clearly noticable when travelling at 10% of the speed of light) will gain mass, and that that's the reason why you can't go faster than light. One of my classmates then asked, why is this so? Why does an object with higher speed gain more mass? This of course is a logical question, since it is not very intuitive that a higher speed leads to a higher mass. My teacher (to my surprise (responded saying that it is a meaningless question, we don't know why, in the same way we don't know why the universe was created and those kind of philosophical questions. I, being interested in physics, couldn't believe this, I was sure that what he said wasn't true. So after a while of thinking I responded saying:
{ "domain": "physics.stackexchange", "id": 9246, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, mass, reference-frames, speed, mass-energy", "url": null }
general-relativity, black-holes, event-horizon Two observers fall into separate black holes, then the black holes merge, can they meet again? I'll try to answer this question based on my intuition about black hole interiors, such as it is, and not any real calculation. A real calculation would be extremely difficult because of the lack of exact solutions describing merging black holes. Assuming realistic trajectories without enormous acceleration, they probably can't meet. The reason is that your maximum proper time to live once you cross the horizon is comparable to the light crossing time of the black hole (~10 µs per solar mass) while the merging time is probably much larger, depending on how you define it. The two holes that were said to merge in 1/5 of a second had a maximum time to live past the horizon of roughly one millisecond. I don't think you can realistically get from the "leg" to the "hip" region of the interior in that time.
{ "domain": "physics.stackexchange", "id": 98537, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, black-holes, event-horizon", "url": null }
time, time-dilation, casimir-effect Owing to the Dirac sea, an empty space which appears to be a true vacuum is actually filled with virtual subatomic particles. These are called vacuum fluctuations. As a photon travels through a vacuum it interacts with these virtual particles, and is absorbed by them to give rise to a virtual electron–positron pair. This pair is unstable, and quickly annihilates to produce a photon like the one which was previously absorbed. The time the photon's energy spends as subluminal electron–positron pairs lowers the observed speed of light in a vacuum.
{ "domain": "physics.stackexchange", "id": 56275, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time, time-dilation, casimir-effect", "url": null }
quantum-field-theory, representation-theory, conformal-field-theory Title: Selecting Kac determinant solutions for Yang-Lee Minimal Model I'm looking into the non-unitary minimal model $\mathcal M_{5,2}$ associated with the Yang-Lee edge singularity. I'm trying to justify which conformal dimensions we expect to appear (easy enough) but having a hard time completely justifying which solutions we don't choose. Let me lay out the theory as I understand it and a sketch of my current justifications and hopefully someone can reaffirm my theory, point out an error or provide an alternative way to achieve the same result. Theory The conformal dimensions that we expect to show up in this model are given by the Kac determinant (the determinant of the Gram matrix $G^{(n)}$ at level $n$) $$ \det G^{(n)} = A_n\prod_{\substack{r,s \geq 1 \\rs \leq n}} (h-h_{r,s})^{\mathcal P(n-rs)} $$ with $\mathcal P$ being the partition function from combinatorics and $h_{r,s}$ given by the coprime integers of the minimal model $\mathcal M_{p,q}$ as $$
{ "domain": "physics.stackexchange", "id": 96367, "lm_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, representation-theory, conformal-field-theory", "url": null }
f(criticalpoint[i][0].rhs(),criticalpoint[i][1].rhs())),color='yellow', size=15)) print "--------------------" print criticalpoint[i] print "Hessian is zero. We do not have a method for this point, to examine what it is." ## We have to create higher-order derivative test
{ "domain": "sagemath.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9873750536904564, "lm_q1q2_score": 0.8311976456121379, "lm_q2_score": 0.8418256492357358, "openwebmath_perplexity": 4844.8301377334465, "openwebmath_score": 0.5647423267364502, "tags": null, "url": "https://wiki.sagemath.org/Differential_Calculus_of_many_variables" }
1. The spectrum is changed as expected to the $k$th powers. 2. The algebraic multiplicities of the eigenvalues powers are retained. If eigenvalues merge, then their multiplicities are added. 3. The geometric multiplicity of $0$ will increase to the algebraic multiplicity. The geometric multiplicities of other eigenvalues are retained. Again if there is merging, then the multiplicities are merged. - Thanks! Does your reply apply to $k \in \mathbb{N}$ or $k \in \mathbb{Z}$? –  Tim Nov 24 '12 at 18:03 "under the same height" means? –  Tim Nov 24 '12 at 18:25
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983847162336162, "lm_q1q2_score": 0.8219881091728884, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 196.40658858632125, "openwebmath_score": 0.9490134716033936, "tags": null, "url": "http://math.stackexchange.com/questions/241764/eigenvalues-and-power-of-a-matrix/242276" }
newtonian-mechanics, newtonian-gravity, reference-frames, centrifugal-force, centripetal-force Title: What provides the centrifugal force for planets orbiting a star? this is a question I had when I was a kid. I'm a bit ashamed because I think I am missing out on something very obvious since I have the same question despite almost being an engineer now! From Newtonian physics, I understand how although the gravitational force pulls the planet towards a star, and the planet 'falls' towards the star, due the angular momentum, it also moves laterally. In case of a planetary orbit, this is just enough to keep it moving around it in an elliptical orbit. (With speed and radius being such that angular momentum and energy is conserved) But let's consider a single planet and star system where the planet moves around the star in a circular path for simplicity. If gravitational force provides centripetal force, what can account for the centrifugal force?
{ "domain": "physics.stackexchange", "id": 38032, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, newtonian-gravity, reference-frames, centrifugal-force, centripetal-force", "url": null }
14. Dec 22, 2014 ### Staff: Mentor I understand your confusion, and think they should have worded the problem better. Chet 15. Dec 23, 2014 Thank you @Chestermiller. I appreciate everyone's help here. 16. Dec 23, 2014 @vela, this is a terrible point. Consider the function. $$h(a) = a^2 + 2a - 3$$ what is the slope of the tangent line at a=1 for example? There is no dy/dx here, but rather dh/da. So your point that the derivative is dy/dx, is absolutely false. 17. Dec 23, 2014 ### vela
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9504109756113862, "lm_q1q2_score": 0.8274251880642137, "lm_q2_score": 0.8705972566572504, "openwebmath_perplexity": 729.6753553242336, "openwebmath_score": 0.8105496168136597, "tags": null, "url": "https://www.physicsforums.com/threads/why-is-the-derivative-of-a-polar-function-dy-dx.783193/" }
python, unit-testing def testStacksetMk(self): bad_list = [] for stack in glob('*/config'): stack_name = os.path.dirname(stack) expected_file = "%s/stackset.mk" % stack_name if not os.path.isfile(expected_file): bad_list.append(expected_file) assert not bad_list, "Expected stackset.mk file to exist: %s" % bad_list These are just two of my test cases. I have plenty more. As can be seen, there is a problem with this code. The for loop for each test case is repeated for each test case, resulting in code duplication and inefficient code. I have done it this way, however, because I want each test case to yield a helpful, specific message about what is wrong. Can anyone see a cleaner way to implement this, so that I have the best of both worlds: duplication refactored out, but I still get to have a separate test case for each logical test? This is an interesting code. Criticism: def testConfigStackYaml(self):
{ "domain": "codereview.stackexchange", "id": 36880, "lm_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, unit-testing", "url": null }
php, classes // Initialize the template with this method, as an instance of // template doesn't make much sense without some text. public static function factory($templateText) { $template = new template(); $template->_templateText = $templateText; return $template; } // This can be called as many times as needed. Alternatively, you could add a // method that would take two arrays, with the idea that the two array's keys // are coupled and paired off. If you choose to couple the two arrays, I would // recommend avoiding passing them in to two different methods. Make the coupling // as obvious as possible by passing them in to the same method. public function replacePlaceholderTextWithString($placeholderText, $string) { // ... }
{ "domain": "codereview.stackexchange", "id": 245, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, classes", "url": null }