text
stringlengths
1
1.11k
source
dict
homework-and-exercises, general-relativity, tensor-calculus Title: Deriving an equation involving Killing vectors I'm currently studying Carroll's GR book Spacetime & Geometry, and ran into some trouble understanding the text. When discussing Killing vectors, Carroll mentions that one can derive $$K^{\lambda}\nabla_{\lambda}R=0$$ That is, the directional derivative of the Ricci scalar along a Killing vector field vanishes (here, $K^{\lambda}$ is a Killing vector). He remarks that the only necessary ingredients to derive this equation are: $$\cdot\;\;\text{The Killing equation:}\ \nabla_{(\mu}K_{\nu )}=0$$ $$\cdot\;\;\text{The Bianchi identity:}\ \nabla_{[\mu}R_{\nu\rho ]\sigma\lambda}=0$$ $$\cdot\;\;\ \nabla_{\mu}\nabla_{\nu}K^{\rho}=R^{\rho}_{\lambda\mu\nu}K^{\lambda}\longrightarrow \nabla_{\mu}\nabla_{\nu}K^{\mu}=R^{\mu}_{\lambda\mu\nu}K^{\lambda}=R_{\lambda\nu}K^{\lambda} $$ With $R_{\mu\nu\rho\sigma}$ the Riemann curvature tensor and $R_{\mu\nu}$ the Ricci tensor.
{ "domain": "physics.stackexchange", "id": 65834, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, general-relativity, tensor-calculus", "url": null }
python, beginner With this change, we can adapt the main "method" to if __name__ == "__main__": logins = read_logins() nextusername, nextpassword = get_next_login_and_remember_the_line_in_the_config_file(logins, username) print(nextusername, nextpassword) Final result import pickle import os def read_logins(): logins = [] with open('logins.txt', 'r') as f: lines = f.readlines() for line in lines: username, password = line.split(":") logins.append([username, password]) return logins def get_next_login_and_remember_the_line_in_the_config_file(logins, username): nextline = 0 for login in logins: if login[0] == username: nextline = (logins.index(login) + 1) % len(logins) with open('conf.pkl', 'wb') as configfile: pickle.dump(nextline, configfile) nextlogin = logins[nextline] return nextlogin[0], nextlogin[1]
{ "domain": "codereview.stackexchange", "id": 44769, "lm_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 }
computer-architecture, cpu-cache, cpu-pipelines Title: What does the processor do while waiting for a main memory fetch Assuming l1 and l2 cache requests result in a miss, does the processor stall until main memory has been accessed? I heard about the idea of switching to another thread, if so what is used to wake up the stalled thread? Memory latency is one of the fundamental problems studied in computer architecture research. Speculative Execution
{ "domain": "cs.stackexchange", "id": 3240, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture, cpu-cache, cpu-pipelines", "url": null }
#### Sudharaka ##### Well-known member MHB Math Helper Hi everyone, Here's a question I encountered in one of my computer science classes. • How many tests are necessary to break a DES encryption by brute force attack? • What is the expected number of tests to break a DES encryption by brute force attack? • How many tests are necessary to break a 128-bit key AES encryption by brute force attack? • What is the expected number of tests to break a 128-bit key AES encryption by brute force attack? And here's my answer. I just want to know whether you think it's correct. It seems ambiguous to me what is meant by necessary and expected in these questions. I hope I did it correctly but want some confirmation. The number of bits in the key of the DES algorithm is 64. However only 56 bits are used in encryption; giving a total number of $2^{56}$ keys. Therefore the expected number of tests to break a DES encryption by brute force is $2^{56}$.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9539661002182844, "lm_q1q2_score": 0.8010777402742068, "lm_q2_score": 0.8397339696776499, "openwebmath_perplexity": 434.4036279170388, "openwebmath_score": 0.5918154120445251, "tags": null, "url": "https://mathhelpboards.com/threads/brute-force-on-des-and-aes.8897/#post-44452" }
c#, entity-framework EXTRA NOTES This isn't a review of your code so much as some advice: make sure you have an index on you Id_question column. I cannot overstate this enough, if you do not have that index then it is going to slow things down a lot. Additionally, entity framework has the ability to select only specific columns from a table. This can be useful if you only need a few columns from a table which has many, and can sometimes bring a noticeable speed increase. In your case it may be worth doing this if you are only querying these items and not modifying them. You can change your items query like so: var items = datab.PropostionForPrint .Where(p => IDs.contains(p.Id_question)) .Select(p => new { p.Id_question, p.response, p.position, p.libelle }) .ToLookup(p => p.Id_question);
{ "domain": "codereview.stackexchange", "id": 42827, "lm_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#, entity-framework", "url": null }
java, performance, comparative-review, battle-simulation private static void victory() { System.out.println("You defeated " + enemy.getName() + "!"); //Handle experience/gold/item(s) here player.addExperience(enemy.getExperience()); player.addGold(enemy.getGold()); player.checkLevelUp(player); displayStats(); player.resetHealthMana(); System.out.println("Press enter to continue"); sc.nextLine(); } private static Ability selectAbility() { player.displayMoves(); while(true) { String input = sc.nextLine(); for(Ability ability : player.getAbilities()) { if(input.equalsIgnoreCase(ability.getName()) && ability.getManaCost() < player.getMana()) { return ability; } } System.out.println("Not a valid move/Not enough mana! Select again!"); } }
{ "domain": "codereview.stackexchange", "id": 34869, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, comparative-review, battle-simulation", "url": null }
c#, asp.net-mvc It looks like the function converts a PascalCase input text to dash-separated-words format. This is actually a quite common text transformation to do. In some frameworks it's called "slugify", and I would prefer this shorter name instead of the current very long name. (Another naming idea: ToCssClass) You seem to have a bug: you check if the input is null, but you don't check if it's empty. If it's empty, then this line will throw an exception: sb.Append(text[0]); Instead of transforming the input character by character, it would be much simpler to use a regex. I don't know the syntax in C#, I hope this Perl/Bash example might help: $ perl -pe 's/[A-Z]/-\L$&/g; s/^-//' <<< HelloWorldThere hello-world-there
{ "domain": "codereview.stackexchange", "id": 14099, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, asp.net-mvc", "url": null }
# Units of the integral group ring Let $G$ be a group of order $\le 4$. Find the unit group of the group ring $\mathbb Z[G]$. Trivially, if $|G|=1$, then the unit group is $\{\pm e\}$, where $e$ is the identity element fo $G$. For $|G| \ge 2$, what should I do? If $|G|=2$, let $a$ be a nonidentity element of $G$, and I let $(ma+ne)(pa+qe)=e$, and tried a long, messy calculation and found the answer. However, I totally stuck in the case $|G| \ge 3$. How should I find all the units in this case? I already know that a group of order 3 is cyclic, and a group of order 4 is either cyclic or isomorphic to Klein-4 group. Also, for the case $|G|=2$, is there more elegant solution without the brutal computation(just what I did)?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540704659681, "lm_q1q2_score": 0.8096435627159952, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 83.99190491264645, "openwebmath_score": 0.9171669483184814, "tags": null, "url": "https://math.stackexchange.com/questions/2135945/units-of-the-integral-group-ring" }
" The range is the set of possible outputs (y-values) and is (-3, infinity). Explain why. For example, x 2 ≥ 0, and √ x ≥ 0. odd and even functions, period and amplitude of a function, composite function, inverse function, trigonometric functions, sketching graphs. Evaluating functions using equations and graphs. , f is not defined at 2. Range (y) = Domain (y-1) Therefore, the range of y is. 2 Domain & Range (Graphs) 2 Write your questions and thoughts here! Increasing/Decreasing Functions: 1. For more information on finding the domain of a function, read the tutorial on Defintion of Functions. The simplest function of all, sometimes called the identity function, is the one that assigns as value the argument itself.  Some Common Restrictions for Certain Functions In order to determine the domain and range for functions, particular attention has to be paid on functions involving square root Question 6 PDF. The line is the graph of f (x) = mx + n. To find the domain, I need to To find
{ "domain": "cefalugibilmanna.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.971563966131786, "lm_q1q2_score": 0.842380693226348, "lm_q2_score": 0.8670357512127872, "openwebmath_perplexity": 429.69633344663407, "openwebmath_score": 0.6847590804100037, "tags": null, "url": "http://yme.cefalugibilmanna.it/questions-on-domain-and-range-of-a-function-pdf.html" }
ros, ros2, rclcpp ORIGINAL: I had the same issue... here's how to fix it: use rosidl_generator_traits::to_yaml(poseMsg) instead of just poseMsg #include <rclcpp/rclcpp.hpp> #include <geometry_msgs/msg/pose_stamped.hpp> [...] geometry_msgs::msg::PoseStamped poseMsg = [...]; RCLCPP_INFO_STREAM(get_logger(), "posevalue:" << rosidl_generator_traits::to_yaml(poseMsg)); [...] I dug through the generated message header files and found it. Originally posted by m.anderson with karma: 91 on 2022-02-17 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 35689, "lm_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, ros2, rclcpp", "url": null }
form is about having a single point and a direction and converting that between an algebraic equation and a graph. The second slope formula is calculation of the slope by two points. The slope formula can give a positive or a negative number as a result. To find the slope of a line given the graph of a line, find any two points on the line. In order to calculate the slope, use the graph and two points. Parallel Lines. Find the slope of the line in the graph. Find the slope of the line that goes through the two points that are given to you. That's okay for the beginner, but it can be a little time consuming. In this equation, m is the slope and (x 1, y 1) are the coordinates of a point. Examples: Find the equation of the line that passes through (-3, 1) with slope …The slope is a measure of the steepness of a line, or a section of a line, connecting two points. Any pair of points on a line will give the same slope. The two primary characteristics of the consumption function--slope and
{ "domain": "metstrategies.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.992422759404464, "lm_q1q2_score": 0.8136808112121532, "lm_q2_score": 0.819893340314393, "openwebmath_perplexity": 326.4255176426403, "openwebmath_score": 0.64701247215271, "tags": null, "url": "http://metstrategies.com/sztvzsd/oofapob.php?khdtkqcnx=graph-slope-formula" }
biochemistry, proteins Title: What is GST RhoA fusion protein? Would you please explain to me what GST RhoA fusion protein means and how it differs from RhoA protein? I am a kind of doing an experiment using this protein. GST is glutathione-S-transferase, an enzyme that binds reasonably tightly to glutathione. It is often used as a tag to purify proteins of interest. In your case, GST has been fused to RhoA most likely so that you have some means to purify it by applying it to a glutathione conjugated column. See here for more information.
{ "domain": "biology.stackexchange", "id": 6921, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "biochemistry, proteins", "url": null }
java, algorithm, statistics, bioinformatics, markov-chain /** * This class defines the hidden states of a hidden Markov model. */ public final class HiddenMarkovModelState { /** * The ID of this state. Used to differentiating between the states. */ private final int id; /** * The state type of this state. */ private final HiddenMarkovModelStateType type; /** * Maps each transition target to the transition probability. */ private final Map<HiddenMarkovModelState, Double> transitionMap = new HashMap<>(); /** * Holds all incoming states. */ private final Set<HiddenMarkovModelState> incomingTransitions = new HashSet<>(); /** * Maps each emission character to its probability. */ private final Map<Character, Double> emissionMap = new HashMap<>(); public HiddenMarkovModelState(int id, HiddenMarkovModelStateType type) { this.id = id; this.type = type; }
{ "domain": "codereview.stackexchange", "id": 45466, "lm_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, statistics, bioinformatics, markov-chain", "url": null }
java, beginner, calculator System.out.println((fn % sn)); objectMain2.v1.addElement((fn % sn)); break; case '^': System.out.println(Math.pow(fn, sn)); objectMain2.v1.addElement(Math.pow(fn,sn)); break; } } }
{ "domain": "codereview.stackexchange", "id": 24261, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, calculator", "url": null }
c#, wpf var rowValue = dxgMainGrid.GetRow(rowHandle); if (rowValue != null) { string ordernumber = (rowValue as clsMainData).strOrderNumber; var update = from x in con.Orders where x.OrderNumber == ordernumber select x; foreach (var item in update) { item.Status = status; item.StatusChanged = DateTime.Now; con.SubmitChanges(); } int index = lstMainData.IndexOf(lstMainData.Where(x => ordernumber == x.strOrderNumber).FirstOrDefault()); lstMainData.RemoveAt(index); dxgMainGrid.RefreshData(); } }
{ "domain": "codereview.stackexchange", "id": 11060, "lm_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#, wpf", "url": null }
vba, excel, community-challenge And here's the code that controls the players when the GO button is clicked this is what controls gameplay - Private Sub btnGo_Click() On Error GoTo errHandler Dim Vx As Integer Vx = cmbVx.Value Dim Vy As Integer Vy = cmbVy.Value Dim x As Integer Dim y As Integer Dim intCase As Integer Dim MoveMe As Range If LabelP1.Visible = True Then intCase = 1 Else: intCase = 2 End If Select Case intCase Case 1 'Speed x = GameBoardSheet.Range("A100") + Vx y = GameBoardSheet.Range("A101") + Vy GameBoardSheet.Range("A100") = x GameBoardSheet.Range("A101") = y 'Move With Cells(Int(CurrentRow.Value), Int(CurrentCol.Value)) .ClearContents .Interior.ColorIndex = xlNone 'Excel uses (rows,cols) notation, so Y direction is first 'We're using (-y) so that positive 1 moves upward Set MoveMe = .Offset(-y, x) End With
{ "domain": "codereview.stackexchange", "id": 15216, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel, community-challenge", "url": null }
automata, pushdown-automata Title: Is a Pushdown Automata possible for this language? PDA for a Language L = { $a^i b^j \mid i \neq 2j+1 \}$ over the Alphabet $\Sigma = \{a,b\}$ If it can be constructed, how? Edit : I've tried make the PDA for $$L = \{ a^i b^j \mid i = 2j+1 \}$$ (with the intention of editing the PDA to accept if $a$ or $b$ is leftover) but can't figure out how to push the proper number of $a$'s. The construction for PDA will be as follows : 1) Push all $a's$ into stack 2) For every $b$ pop two $a'$ from stack, continue this till all $b$ exhaust there will be three condition for acceptance - 1) If stack got empty before $b$ exhaust 2) If stack got empty and $b$ exhaust 3) If there exist more than one $a$ in stack after $b's$ exhaustion. else REJECT.
{ "domain": "cs.stackexchange", "id": 5746, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata, pushdown-automata", "url": null }
Simulation - Simulation X • Quick and easy interface • Number of standard blocks and functions. Simple Harmonic Motion in Matlab Anselm Griffin. 2: The reciprocating at-face follower motion is a rise of 2 in with SHM in 180 of cam rotation, followed by a return with SHM in the remaining 180. MATLAB can handle all these computations effortlessly. [email protected] Learn vocabulary, terms, and more with flashcards, games, and other study tools. A numerical solution with initial conditions y(0) = 0. Introduction to MATLAB. The variables we consider are mass, length of the pendulum, and angle of initial dislocation. critical path motion • Explain how the fundamental law of cam design applies to selecting an appropriate cam profile • Design double dwell cam profiles using a variety of motion types Cam Motion Design: Critical Extreme Position Source: Norton, Design of Machinery. - Simple harmonic motion. McVeigh,1,2 and Jerry L. This example builds on the first-order codes to show how to
{ "domain": "yedy.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357259231532, "lm_q1q2_score": 0.809403734138827, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 797.8372050585724, "openwebmath_score": 0.5793882012367249, "tags": null, "url": "http://hlyf.yedy.pw/simple-harmonic-motion-matlab.html" }
• Indeed it seems I had the wrong understanding of the semantic boundaries of the word axiom. Thank you for clearing that up. So I'd be mildly right in calling it an "axiom in the metalanguage" if one would use my (socially wrong, but more general) notion of axiom? – Martin Worsek Jul 1 '11 at 16:46 • I don't know. I think there's something to get said for the perspective that when looking at a logical system you have to take rules of inference for granted in some sense, but this comes as very different from taking a logical axiom for granted. – Doug Spoonwood Jul 1 '11 at 18:58
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102571131692, "lm_q1q2_score": 0.8279591799166414, "lm_q2_score": 0.8558511488056151, "openwebmath_perplexity": 401.3756771780268, "openwebmath_score": 0.7169190645217896, "tags": null, "url": "https://math.stackexchange.com/questions/48161/in-classical-logic-why-is-p-rightarrow-q-true-if-both-p-and-q-are-false" }
c++, performance, programming-challenge, combinatorics Use const where practical In this case, const isn't used explicitly, but a const iterator may be used in that same inner loop: for (auto g_k = g.cbegin(); *g_k <= n; ++g_k) { Avoid costly mathematical operators Both the / and % operators tend to be somewhat more computationally costly than + and -. For that reason, if performance is your goal, you might want to seek ways to minimize the use of those more costly operators. For instance, instead of this line: if ((g_k - g.begin()) / 2 % 2 == 0) { You could write this instead (assuming 2's complement representation): if ((g_k - g.cbegin()) & 2) {
{ "domain": "codereview.stackexchange", "id": 14059, "lm_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, programming-challenge, combinatorics", "url": null }
# Inspecting the function $f(x)=-x\sqrt{1-x^2}$ We are just wrapping up the first semester calculus with drawing graphs of functions. I sometimes feel like my reasoning is a bit shady when I am doing that, so I decided to ask you people from Math.SE. I am supposed to draw a graph (and show my working) of the function $f(x)=-x\sqrt{1-x^2}$: Below is my work, I'd be very grateful for any comments on possible loopholes in my reasoning (the results should be correct), thanks! $$\text{1. } f(x)=-x\sqrt{1-x^2}$$ Domain: We have a square-root function, therefore we need $1-x^2\geq0$. From that we get$x\in[-1,1]$. As this is the only necessary condition, $D(f)=[-1,1]$. The function is also continuous on this interval as there is nothing that would produce a discontinuity. Symmetry: $f(x)$ is an odd function, as $-f(x)=f(-x)$, as demonstrated here: $$-f(x)=f(-x)$$ $$-(-x\sqrt{1-x^2})=-(-x)\sqrt{1-(-x)^2}$$ $$x\sqrt{1-x^2}=x\sqrt{1-x^2}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983596967003007, "lm_q1q2_score": 0.8436981010957298, "lm_q2_score": 0.8577680995361899, "openwebmath_perplexity": 546.2443192048294, "openwebmath_score": 0.9997690320014954, "tags": null, "url": "http://math.stackexchange.com/questions/275276/inspecting-the-function-fx-x-sqrt1-x2" }
spectroscopy, resonance, raman Title: Which are the differences between resonance Raman and fluorescence? If the fluorescence is the re-emitting of a photon with a larger wavelenght due to the transition from a higher energy state to a lower energy state the case of resonance Raman (where there aren't any virtual states involved) seems be equal to the fluorescence. Which differences are there? okay, old question, but: recall that the virtual state can always be decomposed as a sum over all real states, and the contribution of every real state to the superposition is determined by the matrix element and the difference in energy from the real state to the photon energy; usual perturbation-theory sort of equation where you divide by energy; by the way this is how you get to the usual polarizability equations for non-res raman from the virtual state sort of equation;
{ "domain": "chemistry.stackexchange", "id": 11592, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectroscopy, resonance, raman", "url": null }
scheduling, process-scheduling P2 & 3 & 6 &3 & 3, 15, 27 & 6, 18, 30 \\\hline P3 & 63 & 84 & 21 & 63, 75, 87&84, 96, 108 \\\hline P4 & 0 & 6 & 6 & 0& 6\\\hline P5 & 24 & 36 & 12 & 24, 36, 48& 36, 48, 60\\\hline P6 & 7 & 15 & 8 & 7, 19, 31 & 15, 27, 39\\\hline P7 & 24 & 39 & 13 & 24, 36, 48 & 39, 51, 63\\\hline P8 & 6 & 12 & 6 & 6, 18, 30 & 12, 24, 36\\\hline P9 & 3 & 7 & 4 & 3, 15, 27 &7, 19, 31\\\hline \end{array} $$ What can we say about start times and finish times?
{ "domain": "cs.stackexchange", "id": 13005, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scheduling, process-scheduling", "url": null }
machine-learning, human-like, incomplete-information It is when that occurs that autonomous vehicles and walking robots will begin to have experiences that are like human experiences and we will be able to directly observe just how much like humans they can behave in terms of intelligence and also emotions. About the Specific Capabilities Mentioned These are the capabilities mentioned in the question.
{ "domain": "ai.stackexchange", "id": 613, "lm_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, human-like, incomplete-information", "url": null }
organic-chemistry, inorganic-chemistry, biochemistry Title: Which branches of chemistry and in what order to learn (self study)? Hi I have decided to give chemistry another shot (it didn't take so well way back in high school). My main interest is for reading up on brain chemistry and pharmacology. I currently have a textbook on inorganic chemistry [Introduction to Organic Chemistry 3rd edition: William Brown.Thomas Poon] that I picked up and am working my way through - well I have made it through chapter 1 at least [Covalent Bonding and Shapes of Molecules]. And am also making use of The UC Davis (Organic) ChemWiki.
{ "domain": "chemistry.stackexchange", "id": 12929, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, inorganic-chemistry, biochemistry", "url": null }
stoichiometry Title: Dimensional Analysis in Chemistry I was once told on this site that it was incorrect form to use units that specify the chemical being referred to in dimensional analysis. For example: $$150.~\mathrm{g}~~\ce{KNO3} \cdot \frac{1~\mathrm{mol}~~\ce{KNO3}}{101.103~\mathrm{g}~~\ce{KNO3}} \cdot{} \frac{1~\mathrm{mol}~~\ce{C7H4O}}{6~\mathrm{mol}~~\ce{KNO3}} \cdot \frac{104.106~\mathrm{g}~~\ce{C7H4O}}{1~\mathrm{mol}~~\ce{C7H4O}}=25.7~\mathrm{g}~~\ce{C7H4O}$$ This is the way I learned it, and I feel that this clears up confusion that might otherwise arise when from performing such a calculation.
{ "domain": "chemistry.stackexchange", "id": 3363, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "stoichiometry", "url": null }
c#, linq Title: I've started Tuples to LINQ and I'm not sure if it's an anti pattern I have public static class TupleExtensions { public static IEnumerable<T> SelectMany<T>(this IEnumerable<Tuple<T, T>> te) { foreach (var t in te) { yield return t.Item1; yield return t.Item2; } } public static IEnumerable<T> SelectMany<T, U>(this IEnumerable<U> source, Func<U, Tuple<T, T>> fn) { foreach (var s in source) { var t = fn(s); yield return t.Item1; yield return t.Item2; } } public static IEnumerable<T> SelectMany<T, U>(this IEnumerable<U> source, Func<U, Tuple<T, T, T>> fn) { foreach (var s in source) { var t = fn(s); yield return t.Item1; yield return t.Item2; yield return t.Item3; } }
{ "domain": "codereview.stackexchange", "id": 3998, "lm_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#, linq", "url": null }
energy, momentum, collision I can use that momentum is conserved in the x axis I described above and that the kinetic energy is also conserved but that doesn't use angle $a$ at all and I'm also missing one equation. This is a problem I came up myself, so I don't know if any books contain it. Any help would be greatly appreciated. In one dimension, the outcome of an elastic collision is fully determined by energy and momentum conservation. In higher dimensions, this isn't true. Instead, you have a scattering problem, and you need the full microscopic dynamics, i.e. the exact form of the force between the two objects. So the answer is indeterminate. However, in this case, we might say the force is a hard core repulsion (i.e. neither the incline or the ball compress during the collision) that is always normal to the incline. In that case, the third equation is conservation of the ball's component of momentum perpendicular to the incline. This depends on the angle $a$, so it gives you your solution.
{ "domain": "physics.stackexchange", "id": 33410, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, momentum, collision", "url": null }
c++, base64 switch (len % 3) { case 2: encoded += /* first sextet masked and shifted */ encoded += /* second sextet masked and shifted */ encoded += /* third sextet masked and shifted */ encoded += '='; break; case 1: encoded += /* first sextet masked and shifted */ encoded += /* second sextet masked and shifted */ encoded += '='; encoded += '='; break; case 0: break; } return encoded;
{ "domain": "codereview.stackexchange", "id": 33487, "lm_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++, base64", "url": null }
quantum-algorithms, programming, simulation, matlab Title: Can my MatLab code be used as a good simulator of a quantum computer? I have tried to program universal quantum computer simulator in MatLab. Please find a code here: https://www.mathworks.com/matlabcentral/fileexchange/73035-quantum-computer-simulator Can be this code used as a good simulator of quantum computer? Thanks for answer. After using the simulator, I am very impressed! From what I can tell, it has everything necessary to be universal. I will likely be using this quite a bit. To test drive it, I implemented a simple 3-qubit Fourier transform and applied it to a set of random initial states, then compared the result to the well known 3-qubit unitary DFT (dft) applied to the same set of states. The code I ran is below, and the results agreed.
{ "domain": "quantumcomputing.stackexchange", "id": 1056, "lm_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-algorithms, programming, simulation, matlab", "url": null }
observational-astronomy Regardless of the degree you pursue, you will need a lot of mathematics and science. During your undergraduate degree, I would recommend the following minimums: 3 semesters of Calculus, 1 semester of Ordinary Differential Equations, 1 semester of Linear Algebra (some schools combine ODE and LA), 3 semesters of Introductory Physics. I'd recommend a semester or two of introductory astronomy, although some schools don't consider that as absolutely necessary, surprisingly. Other useful undergraduate courses will depend on what you think you will want to specialize in, but would include more physics, more astronomy, chemistry, geology, meteorology, etc. If you aren't yet in college, take all the mathematics and physical science courses you can in high school... unless you're interested in becoming a astrobiologist (someone who studies living organisms on other planets - a speculative field at this point, but it does exist), in which case you should get some biology courses too!
{ "domain": "astronomy.stackexchange", "id": 26, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy", "url": null }
IntegerRange is designed to have similar interface Python range. However, whereas range accept and returns Python int, IntegerRange deals with Integer. If middle_point is given, then the elements are generated starting from it, in a alternating way: $$\{m, m+1, m-2, m+2, m-2 \dots \}$$. EXAMPLES: sage: list(IntegerRange(5)) [0, 1, 2, 3, 4] sage: list(IntegerRange(2,5)) [2, 3, 4] sage: I = IntegerRange(2,100,5); I {2, 7, ..., 97} sage: list(I) [2, 7, 12, 17, 22, 27, 32, 37, 42, 47, 52, 57, 62, 67, 72, 77, 82, 87, 92, 97] sage: I.category() Category of facade finite enumerated sets sage: I[1].parent() Integer Ring When begin and end are both finite, IntegerRange(begin, end, step) is the set whose list of elements is equivalent to the python construction range(begin, end, step): sage: list(IntegerRange(4,105,3)) == range(4,105,3) True sage: list(IntegerRange(-54,13,12)) == range(-54,13,12) True Except for the type of the numbers:
{ "domain": "sagemath.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399034724604, "lm_q1q2_score": 0.8042695073202554, "lm_q2_score": 0.8289388062084421, "openwebmath_perplexity": 12446.528103650078, "openwebmath_score": 0.39644908905029297, "tags": null, "url": "http://sagemath.org/doc/reference/structure/sage/sets/integer_range.html" }
is not easy to find in a closed form. Question: Find The Full Taylor Series Representation For F(x) = E^(-x/2) Centered Around X=1 And Find The Radius Of Convergence And Interval Of Convergence For This Taylor Series By Performing An Appropriate Convergence Test On The Power Series. Recall that a power series, with center c, is a series of functions of the following form. Power Series. For simplicity, we discuss the examples below for power series centered at 0, i. : Thus, denoting the right side of the above inequality by r, we get the interval of convergence | x | < r saying, for every x between -r and r the series converges absolutely while, for every x outside that interval the series diverges. Using sine and cosine terms as predictors in modeling periodic time series and other kinds of periodic responses is a long-established technique, but it is often overlooked in many courses or textbooks. Give the first four nonzero terms and the general term of the power series. Thus 1 1 (
{ "domain": "uiuw.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109099773435, "lm_q1q2_score": 0.8449559907325764, "lm_q2_score": 0.8539127585282744, "openwebmath_perplexity": 247.03012874041477, "openwebmath_score": 0.8984718322753906, "tags": null, "url": "http://imax.uiuw.pw/interval-of-convergence-taylor-series-calculator.html" }
# Show that an integer is unique 1. Nov 29, 2016 ### Mr Davis 97 1. The problem statement, all variables and given/known data Suppose that a and b are odd integers with a ≠ b. Show that there is a unique integer c such that |a - c| = |b - c| 2. Relevant equations 3. The attempt at a solution What I did was this: Using the definition of absolute value, we have that $(a - c) = \pm (b - c)$. If we choose the plus sign , then we have that $a = b$, which contradicts our original assumption. So $a - c = -b + c \implies c = \frac{a + b}{2}$. Does this solve the original problem? I have shown that there exists an integer $c$, but is this sufficient to show that this c is unique? 2. Nov 29, 2016 ### Staff: Mentor Yes. If you like, you can assume, that $c'$ is another solution. But the same argument gives you $c'=\frac{a+b}{2}=c$.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126531738088, "lm_q1q2_score": 0.839508499622006, "lm_q2_score": 0.8577681068080749, "openwebmath_perplexity": 278.4523511501125, "openwebmath_score": 0.7038605213165283, "tags": null, "url": "https://www.physicsforums.com/threads/show-that-an-integer-is-unique.895228/" }
homework-and-exercises, statistical-mechanics, phase-transition $$ \tanh(6\beta J m)^2 = \frac{\cosh(6\beta J m)^2-1}{\cosh(6\beta J m)^2} $$ and thus, using the consistency equation $$ \cosh(6\beta J m)^2 = \frac{1}{1- \tanh(6\beta J m)^2} = \frac{1}{1-m^2} \ . $$ Hence we get $$ F(m,T) = 3 J N m^2 + \frac{N}{2\beta} \log \frac{1}{1-m^2} - \frac{N}{\beta} \log 2 $$ Expanding in $m$: $$ F(m,T) = (1 - 6\beta J) \frac{N m^2}{2} + \frac{N m^4}{4 \beta} + \mathcal{O}(m^6) \ .$$ Note that if $t = \frac{T-T_c}{T}$, then $$ (1 - 6\beta J) = \frac{T}{T_c} \frac{T-T_c}{T_c} = t + t^2 $$ and $$ \frac{1}{\beta} = T_c + t T_c $$ So $$ F(m,t) = \frac{t N m^2}{2} + \frac{T_c N m^4}{4} + \mathcal{O}(t^2,m^6,m^4 t) $$ Which is a sensible Landau free energy functional, but is not formulated in terms of the total magnetization $M$, so that remains unclear to me.
{ "domain": "physics.stackexchange", "id": 52617, "lm_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, statistical-mechanics, phase-transition", "url": null }
$$6\times 5 \times 4 \times 3 \times 2 \times 1 = 6!$$ This is how we get $6!$ as our answer. I hope this helps you to understand, if you still have questions, feel free to comment and I will do my best to answer them. - Yes it make much more sense now. Thank you so much. –  CJS Jun 12 '12 at 18:21 The question is phrased poorly; taken literally, with 6 boys and 6 girls, the answer to "How many couples can perform together?" is "Six." You can't have more than that many couples, because you would need more people, and you can certainly have six couples performing at the same time. However, it seems clear that the question is meant to be something along the lines of: In how many different ways can we pair the boys and the girls to make six couples that will all dance at the same time?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806529525571, "lm_q1q2_score": 0.8128413599934694, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 220.31096189872764, "openwebmath_score": 0.7118151187896729, "tags": null, "url": "http://math.stackexchange.com/questions/157469/dance-couples-permutation-question" }
quantum-field-theory, particle-physics, gauge-theory, quantum-electrodynamics, quantum-chromodynamics is no need then to further modify $K_A$ in order to account for it's vituality. Furthermore the substitution i made in the question effectively cancelled the virtuality of the gluon! (like i added it in $K_B$ and $K_C$ and subtracted it in $K_A$)
{ "domain": "physics.stackexchange", "id": 24651, "lm_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, particle-physics, gauge-theory, quantum-electrodynamics, quantum-chromodynamics", "url": null }
# How can I tell whether this set is closed or open? the question I'm having trouble with is this: $$A:=\bigcup_{n=1}^{\infty}\left({\left[\frac{1}{n+1},\frac{1}{n}\right) \times \left(0,n\right)}\right).$$ In the Euclidean space $\mathbb{R}^2$, is the subset $A$ either closed or open? I drew a picture in $\mathbb{R}^2$ and I really think it's open, but I can't come up with an elaborate way to describe why. Any help would be appreciated. Thanks. • The two intervals are both open in $\mathbb{R}$, you can use this. – Ninja Apr 19 '17 at 12:19 • how is the first one open? – DHMO Apr 19 '17 at 12:20 • First one is $(0,1)$, is not it? – Ninja Apr 19 '17 at 12:20 • but union of products is not product of unions – DHMO Apr 19 '17 at 12:21 • adding parentheses... – GEdgar Apr 19 '17 at 12:26
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983847165177859, "lm_q1q2_score": 0.8219881055018017, "lm_q2_score": 0.8354835330070839, "openwebmath_perplexity": 345.1923950707851, "openwebmath_score": 0.7885132431983948, "tags": null, "url": "https://math.stackexchange.com/questions/2241699/how-can-i-tell-whether-this-set-is-closed-or-open" }
objective-c, memory-management, singleton Title: Objective-C retain / release snippet Here are some snippets I coded and I would like some feedback on my way of handling this: I have a utility class, as a singleton, that provides me with a method named randomColor which returns a (UIColor*): -(UIColor*)randomColor { float l_fRandomRedColor = [[MathUtility instance] randomFloatNumberBetweenNumber:0.0f AndNumber:1.0f]; float l_fRandomBlueColor = [[MathUtility instance] randomFloatNumberBetweenNumber:0.0f AndNumber:1.0f]; float l_fRandomGreenColor = [[MathUtility instance] randomFloatNumberBetweenNumber:0.0f AndNumber:1.0f]; return [UIColor colorWithRed:l_fRandomRedColor green: l_fRandomGreenColor blue: l_fRandomBlueColor alpha: 255]; }
{ "domain": "codereview.stackexchange", "id": 2676, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c, memory-management, singleton", "url": null }
pharmacology, mycology Title: Are psilocybin/psilocyn the only psychoactive compounds in psychoactive mushrooms? Psilocybe cubensis is the most common psychedelic mushroom, and its active ingredients are psilocin and psilocybin (which is converted to psilocin in the body). There are other psychedelic mushrooms, such as psilocybe cyanescens, psilocybe mexicana, and amanita muscaria, as well as many others. Are there any other psychoactive compounds in mushrooms other than psilocybin and psilocin? I found this page but wonder if it is exhaustive: https://en.wikipedia.org/wiki/List_of_psychoactive_plants,_fungi,_and_animals?wprov=sfti1 Yes, there are multiple psychoactive compounds, including norpsilocin, baeocystin, norbaeocystin, and aeruginascin. Ergot and Fly-Argaric have different substances. A lot of mushrooms contain ergot alkaloids to defend against nematodes and bacteria.
{ "domain": "biology.stackexchange", "id": 12226, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pharmacology, mycology", "url": null }
ros, message-filter Title: Is there any way to subscribe a topic in message_filter and not filtering it? Hi, I am subscribing two topics (servo position and laser scan) in message_filter for my application. Now, when I use approximate_time_synchronizer, as laser scan publishes in low frequency, callback function provides servo data at the laser scan frequency. I also need to use the original servo position topic along with these two (laser and servo) that comes as output of message_filter. I am finding trouble in using shared_memory access to access the original servo data across multiple processes. Is there any provision in ros message_filter that I subscribe some topic in message_filter and do not use it during filtering and that is accessible in the callback as well. Please let me know if any thing like that is feasible? code: void callback(const dynamixel_msgs::JointState::ConstPtr& msg, const sensor_msgs::LaserScan::ConstPtr& scan_in) { ROS_ERROR("Enter Publish");
{ "domain": "robotics.stackexchange", "id": 29291, "lm_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, message-filter", "url": null }
radioactivity, half-life I want to ask you: ----Assumption to be taken: half-life is not probabilistic.---- Does a smaller half-life mean that the rate of energy/radiation release is faster? The definition of half-life is the amount of time it takes for half an amount(in terms of mass) of a radioactive substance to disintegrate. Since this mass is lost by radiation(energy), does that mean that an inverse proportionality between half-life and rate of energy release exists? My questions are: If one has (x) mass of radioactive element (1) which has a half-life (a) and (x) mass of radioactive element (2) which has a half-life (a/2).
{ "domain": "physics.stackexchange", "id": 36979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "radioactivity, half-life", "url": null }
Bill replied, Yes it does. So the first step should not be direct substitution. It should be determining if it’s continuous and can be done by graphing. I’m not sure what you mean by “can be done by graphing”. Graphing, as I think of it, doesn’t prove anything, though it can be useful in deciding what you think the limit is, giving you something specific to prove. If you know, by the form of the function, that it is continuous, then the definition of continuity tells you that the limit is just f(a). There are theorems that say certain types of functions, such as polynomials, are continuous everywhere (or everywhere except certain points). If you can’t establish by such means that the function is continuous, then you have to use other properties or theorems of limits to find the limit, or to determine (as in this case) that the limit does not exist.
{ "domain": "themathdoctors.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771751368138, "lm_q1q2_score": 0.8113174762432728, "lm_q2_score": 0.8221891392358015, "openwebmath_perplexity": 321.4405209782946, "openwebmath_score": 0.8534117341041565, "tags": null, "url": "https://www.themathdoctors.org/limits-and-derivatives-on-the-edge/" }
statistical-mechanics $\int_0^T i\sqrt{2\alpha} {dX\over dt}\eta(t) dt = \int_0^T \sqrt{2\alpha}V_0\eta e^{i\Omega t + i\sqrt{2\alpha} B(t)} dt$ And considering that $\eta = {dB\over dt}$ by definition, this would be a perfect integral up to adding Omega, in the stratonovich convention, where the chain rule works. But this is Ito, so you do the half-commutator trick etc, etc, I'll leave out the details, but the end result gives just one consistent equation for $\Delta X$ $\Delta X = V_0 \int_0^T \exp(i\Omega t + B(t)) dt$ which tells us nothing new, because this is just the integral of the velocity from the explicit solution. So there is no way to evaluate the Smoluchowski limit without knowing something about the integral of cosines and sines of a Brownian motion. This is the central problem that the book is posing. The integral of cosines and sines of a Brownian motion To get the Smolochowski limit, all you need evaluate the average square distance traveled after time t:
{ "domain": "physics.stackexchange", "id": 1481, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics", "url": null }
machine-learning, probability-distribution, generalization If I collect a large number of photographs of $H \times W$ pixels of streets for the purpose of training a self-driving car, then this collection of training data was collected from some distribution. For each of the pixels in the $H \times W$ plane, there exists some probability distribution that tells us how likely it is for such a pixel to have a certain colour under the data collection procedure that was used to generate our data. This is a largely unknown distribution, for which we don't have a nice mathematical expression, but it does exist. I assume that, in this distribution, it's relatively likely for pixels in the centre to be gray (because streets tend to be gray and we collected data by taking photographs of streets). I also guess it's relatively likely for pixels at the top of the images to be blue, because of the sky. Other than that, we can't say much about the distribution, but it does exist.
{ "domain": "ai.stackexchange", "id": 1763, "lm_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, probability-distribution, generalization", "url": null }
These include dividing the annual coupon rate in half, calculating the total number of compounding periods, and multiplying the bond's current face value by the semiannual interest rate … If the yield to maturity for a bond is less than the bond’s coupon rate, then the (clean) market value of the bond is greater than the par value (and vice versa). To calculate the rate of return for a dividend-paying stock you bought 3 years ago at$100, you subtract it from the current $175 value of the stock and add in the$25 in dividends you've earned over the 3-year period. Plug all the numbers into the rate of return formula: = (($250 +$20 – $200) /$200) x 100 = 35% Therefore, Adam realized a 35% return on his shares over the two-year period. Target date mutual funds or ETFs take into consideration how long a person has before retirement and invests in a variety of securities that adjust over time to that investor's needs. Price is important when you intend to trade bonds with other investors. For
{ "domain": "schrijfeenbouquet.nl", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854146791214, "lm_q1q2_score": 0.806030409381157, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 1693.8225016339977, "openwebmath_score": 0.32949429750442505, "tags": null, "url": "http://schrijfeenbouquet.nl/kroger-french-nkbg/13a09b-rate-of-return-on-bond-formula" }
javascript, asynchronous, timer var fnargs = slc( arguments, 1 ) .keep( function ( i, o ) { return isfn( o ); } );
{ "domain": "codereview.stackexchange", "id": 4578, "lm_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, asynchronous, timer", "url": null }
beginner, c, sorting It seems unlikely that you accidentally change len. But why take a risk? const puts an ease on your mind. Make exclusive branches exclusive We're still following your function top-to-bottom. And while your for finding the minimum and maximum of the range works, it's not really friendly to our PC: for (int i=1; i<len; i++) { if (input[i]>max) { max = input[i]; } if (input[i]<min) { min = input[i]; } } You start with max = min. However, throughout your program, the following property will hold: min <= max. So if the input[i] is greater then max, it will certainly not be lesser than min. We can reflect that with an else: for (int i=1; i<len; i++) { if (input[i] > max) { max = input[i]; } else if (input[i] < min) // << here { min = input[i]; } }
{ "domain": "codereview.stackexchange", "id": 24354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, sorting", "url": null }
Consider the function for $x>1,n>1$ $$f(n)=n^x-(n-1)^x$$ $$f'(n)=xn^{x-1}-x(n-1)^{x-1}=x(n-1)^{x-1}[(1+\frac{1}{n-1})^{x-1}-1]>0$$ So $f(n)$ is increasing for $x>1,n>1$. Now rewrite the equation $$5^x+7^x+11^x=6^x+8^x+9^x$$ $$\color{red}{(11^x-10^x)}+\color{blue}{(10^x-9^x)}=\color{red}{(8^x-7^x)}+\color{blue}{(6^x-5^x)}$$ Comparing the red and blue parts, LHS is larger than RHS due to increasing $f(n)$. So the equation holds only if $0\le x\le 1$ for natural number solutions, i.e. $x=0$ or $x=1$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241965169939, "lm_q1q2_score": 0.8139744515580275, "lm_q2_score": 0.8397339656668286, "openwebmath_perplexity": 150.68527036910146, "openwebmath_score": 0.9557837247848511, "tags": null, "url": "https://math.stackexchange.com/questions/2840394/find-the-number-of-natural-solutions-of-5x7x11x-6x8x9x" }
algorithms, complexity-theory, turing-machines, computation-models This paragraphs is describing why condition 2 is necessary for strongly polynomial time algorithm, it is not stating the difference between strongly and weakly polynomial time algorithms. In fact, condition 2 is also necessary for weakly polynomial time algorithm, and the example algorithm that computes $2^{2^n}$ given $2^n$ is NOT weakly polynomial (and is even not a polynomial time algorithm). In fact, it is condition 1 that describes the difference between strongly and weakly polynomial time algorithms. Note the definition of strongly polynomial time algorithms is equivalent to condition 1; and the algorithm is a polynomial time algorithm (in the TM model) While the definition of weakly polynomial time algorithms is equivalent to condition 1 is not satisfied; and the algorithm is a polynomial time algorithm (in the TM model) It is more clear to see the difference between strongly and weakly polynomial time algorithms with these two redefinitions.
{ "domain": "cs.stackexchange", "id": 15541, "lm_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, complexity-theory, turing-machines, computation-models", "url": null }
javascript, jquery // Sync is performed on change event $('select').change(function() { var optionText = $(this).find('option:selected').text(); $(this).prev().text(optionText); }); Instead of rewriting the code you can just trigger the change event after you bind it which will cause it to sync on page load $('select').change(function() { var optionText = $(this).find('option:selected').text(); $(this).prev().text(optionText); }).trigger('change'); // <-- trigger change
{ "domain": "codereview.stackexchange", "id": 3065, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery", "url": null }
# Closed balls are closed Let $E \subset X, p \in X$ and $(X,d)$ a metric space such that $E := \{q \in X\mid d(p,q) \leq r\}$. By definition, this is a closed ball with center $p$ and radius $r$. I now want to show that this set is closed (i.e. it contains all its limit points). Proof Let $k$ be a limit point of $E$. Let $\epsilon >0$ and define $N_{\epsilon}(k)$ as the open ball (neighborhood) with center $k$ and radius $\epsilon$. By definition of limit point, there exists $z \in E \cap N_{\epsilon}(k)$ such that $z \neq k$. Hence we have $d(p,z) \leq r$ and $d(k,z) < \epsilon$, so by triangle inequality, we have $d(p,k) < r + \epsilon$. Because $\epsilon >0$ is chosen arbitrarily, it follows that $d(p,k) \leq r$ (if $d(p,k) > r$, then $d(p,k) - r > 0$, implying that $d(p,k) < d(p,k)$, which is absurd). We deduce that $k \in E$ and hence $E$ is closed. $\quad \square$ Is my proof correct? Is there an easier proof?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138144607745, "lm_q1q2_score": 0.8423378020947382, "lm_q2_score": 0.86153820232079, "openwebmath_perplexity": 123.21272840096134, "openwebmath_score": 0.94517982006073, "tags": null, "url": "https://math.stackexchange.com/questions/2400239/closed-balls-are-closed/2400280" }
con: array([-2.22044605e-16, 0.00000000e+00, 0.00000000e+00]) fun: 141018.2434979269 message: 'Optimization terminated successfully.' nit: 4 slack: array([0., 0.]) status: 0 success: True x: array([ 1.37644176, 1.29852997, 1.22502827, 0. , 0. , -0.16502827, 0.00147003]) The optimal value for the dual problem is 141018.24, which equals the value of the primal problem. Now, let’s interpret the dual variables. By strong duality and also our numerical results, we have that optimal value is: $100,000 p_1 - 20,000 p_4 - 20,000 p_5 - 20,000 p_6 + 50,000 p_7.$ We know if $$b_i$$ changes one dollor, then the optimal payoff in the end of the third year will change $$p_i$$ dollars. For $$i = 1$$, this means if the initial capital changes by one dollar, then the optimal payoff in the end of the third year will change $$p_1$$ dollars. Thus, $$p_1$$ is the potential value of one more unit of initial capital, or the shadow price for initial capital.
{ "domain": "quantecon.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9901401470240553, "lm_q1q2_score": 0.8048525655947445, "lm_q2_score": 0.8128673178375735, "openwebmath_perplexity": 936.0125792507591, "openwebmath_score": 0.998445451259613, "tags": null, "url": "https://python.quantecon.org/lp_intro.html" }
• Maybe i'm not understanding correctly but using $\delta_1=\frac{\epsilon}{\sqrt{2}}$ and letting $\epsilon=1$ which would be the unit circle and the line $y=\frac{1}{\sqrt{2}}-x$ which does have a section of the circle not covered by the diamond. – Justin Stevenson Sep 11 '17 at 22:15 • What I claim is that the $D$-ball with radius $\frac{\varepsilon}{\sqrt{2}}$ is contained in the $d$-ball of radius $\varepsilon$ (notice the rôles of $d_1 = D$, $d_2 =d$), and also that the $d$-ball of radius $\frac{\varepsilon}{2}$ is contained in the $D$-ball of radius $\varepsilon$. Both are correct (draw the pictures for $\varepsilon=1$) @JustinStevenson. – Henno Brandsma Sep 12 '17 at 6:34
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9901401451328852, "lm_q1q2_score": 0.8293611480474955, "lm_q2_score": 0.8376199592797929, "openwebmath_perplexity": 149.99680472443208, "openwebmath_score": 0.7511361241340637, "tags": null, "url": "https://math.stackexchange.com/questions/2425735/showing-these-two-metrics-are-equivalent" }
star, orbit, planet Title: Why are orbits elliptical instead of circular? Why do planets rotate around a star in a specific elliptical orbit with the star at one of it's foci? Why isn't the orbit a circle? Assume the planet has a negligible mass compared to the star, that both are spherically symmetric (so Newton's law of gravitation holds, but this normally happens to a very good approximation anyway), and that there aren't any forces besides the gravity between them. If the first condition does not hold, then the acceleration of each is going to be towards the barycenter of the system, as if barycenter was attracting them a gravitational force with a certain reduced mass, so the problem is mathematically equivalent. Take the star to be at the origin. By Newton's law of gravitation, the force is $\mathbf{F} = -\frac{m\mu}{r^3}\mathbf{r}$, where $\mathbf{r}$ is the vector to the planet, $m$ is its mass, and $\mu = GM$ is the standard gravitational parameter of the star. Conservation Laws
{ "domain": "astronomy.stackexchange", "id": 4996, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "star, orbit, planet", "url": null }
thermodynamics, temperature, metrology The kelvin, unit of thermodynamic temperature, is the fraction 1/273.16 of the thermodynamic temperature of the triple point of water. There's a lot hiding in that simple definition. One key concept is that of thermodynamic temperature. A temperature scale that does not have zero at absolute zero is not a thermodynamic temperature scale. So in this sense, the Kelvin scale has two fixed points, absolute zero and the triple point of water. Another issue hiding in that definition is that it uses the triple point of water. Purified water from an East African lake, from the oceans, or Antarctic ice have slightly different triple points, slightly different freezing points, and slightly different boiling points. The isotopic composition of water varies with latitude. To get around this issue, the water used in determining the triple point of water must have a very specific isotopic composition specified by the Vienna Standard Mean Ocean Water (VSMOW) standard.
{ "domain": "physics.stackexchange", "id": 27082, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, metrology", "url": null }
c++, tree } else if((temp->left) && !(temp->right)){ if(temp==root){ root = root->left; delete temp; } else{ node* parent = getParent(val); if(parent->right==temp){parent->right = temp->left; delete temp;} else{parent->left = temp->left; delete temp;} } } else{ node* minNode =temp->right; while(minNode->left){ minNode = minNode->left; } int valStoring = minNode->val; deleteVal(minNode->val); temp->val = valStoring; } return; }
{ "domain": "codereview.stackexchange", "id": 14802, "lm_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++, tree", "url": null }
ruby, ruby-on-rails, geospatial end def get_file_format(header) headers_hash = {:flysight => %w(time lat lon hMSL velN velE velD hAcc vAcc sAcc gpsFix numSV), :flysight2 => %w(time lat lon hMSL velN velE velD hAcc vAcc sAcc heading cAcc gpsFix numSV), :columbusV900 => %w(INDEX TAG DATE TIME LATITUDE\ N/S LONGITUDE\ E/W HEIGHT SPEED HEADING VOX)} headers_hash.select{|key,hash| hash == header}.keys[0] end def parse_csv_row(row, format) if (format == :flysight) || (format ==:flysight2) return nil if (row[1].to_f == 0.0 || row[8].to_i > 70) {:latitude => row[1].to_f, :longitude => row[2].to_f, :elevation => row[3].to_f, :abs_altitude => row[3].to_f, :point_created_at => row[0].to_s} elsif format == :columbusV900 return nil if row[6].to_f == 0.0
{ "domain": "codereview.stackexchange", "id": 10195, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby, ruby-on-rails, geospatial", "url": null }
electromagnetism, charge, dimensional-analysis, coulombs-law, physical-constants Consider this equation which is one of Maxwell’s equations, $$\oint_S \vec E \cdot \vec{dS} = \frac{Q}{\epsilon_0}$$ where this surface integral $S$ is taken over a closed sphere surrounding the charge $Q$ then $$E (4\pi r^2) = \frac{Q}{\epsilon_0}$$ and given that the electric field $E$ is defined as the force per unit charge ie., $$E = \frac{F}{q}$$ then we can write $$F = \frac{Qq}{4\pi \epsilon_0 r^2}$$ which is Coulomb’s Law. The vacuum permitivity constant is a measure of how much a vacuum permits an electric field. Most problems we assume that there is nothing else in the space between the charges we are studying, which is why we use $\epsilon_0$. In cases where we do, we use the dielectric constant $\epsilon$ which is a measure of how much the medium permits an electric field. When we manipulate Maxwell’s equations, we end up with the electromagnetic wave equation and as you can see in the link $$v = \frac{1}{\sqrt{\mu \epsilon }}$$
{ "domain": "physics.stackexchange", "id": 74777, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, charge, dimensional-analysis, coulombs-law, physical-constants", "url": null }
quantum-spin, group-representations, lie-algebra \begin{align} A_i = \frac{1}{2}(J_i + iK_i), \qquad B_i = \frac{1}{2}(J_i - iK_i) \end{align} which now an "A-copy" and a "B-copy" of the $\mathfrak{sl}(2,\mathbb C)$ algebra; \begin{align} [A_i, A_j] = i\epsilon_{ijk} A_k, \qquad [B_1, B_j] = i\epsilon_{ijk}B_k, \qquad [A_i, B_j] = 0 \end{align}
{ "domain": "physics.stackexchange", "id": 9217, "lm_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-spin, group-representations, lie-algebra", "url": null }
• We proceed by finding $$p$$ eigenvectors and eigenvalues, since the JCF and minimal polynomials will involve eigenvalues and the transformation matrix will involve (generalized) eigenvectors. Each vector of the form $$\mathbf{p}_i \coloneqq\mathbf{e}_1 - \mathbf{e}_{i+1} = {\left[ {1, 0, 0,\cdots, 0 -1, 0, \cdots, 0 } \right]}$$ where $$i\neq j$$ is also an eigenvector with eigenvalues $$\lambda_0 = 0$$, and this gives $$p-1$$ linearly independent vectors spanning the eigenspace $$E_{\lambda_0}$$ $$\mathbf{v}_1 = {\left[ {1, 1, \cdots, 1} \right]}$$ is an eigenvector with eigenvalue $$\lambda_1 = p$$.
{ "domain": "dzackgarza.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9908743636887527, "lm_q1q2_score": 0.8030827774478073, "lm_q2_score": 0.8104789132480439, "openwebmath_perplexity": 362.4303021135475, "openwebmath_score": 0.9997151494026184, "tags": null, "url": "https://quals.dzackgarza.com/10_Algebra/TexDocs/QualAlgebra_stripped.html" }
statics, stress-strain Title: Poisson effect formula for large deformations English Wikipedia in the Poisson's ratio article gives an equation for large deformation: $$ \frac{\Delta d}{d}=-1+\frac{1}{\left(1+\dfrac{\Delta L}{L}\right)^\nu} $$ I couldn't find any reference for this equation. Could someone help? I need it in my thesis, and I'd like to reference some other source than Wikipedia. Every other publication I've seen so far gives the approximate (linear) equation. Start with differential form of Poisson's ratio: $$\frac{\text{d} x}{x}=- \nu \frac{\text{d} l}{l}$$ $$\int_{x_0}^{x_0+\Delta x} \frac{\text{d} x}{x}=- \nu \int_{l_0}^{l_0+\Delta l} \frac{\text{d} l}{l}$$ $$\ln \frac{x_0+\Delta x}{x_0}=- \nu \ln \frac{l_0+\Delta l}{l_0}$$ $$1 + \frac{\Delta x}{x_0}=\left(1+\dfrac{\Delta l}{l_0}\right)^{-\nu}$$
{ "domain": "physics.stackexchange", "id": 3418, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statics, stress-strain", "url": null }
quantum-field-theory, temperature If the question is "When physicists say 'temperature', what do they mean?" then I'll list a couple of possibilities below... If the state is (1), then the quantity $1/\beta$ is typically called "temperature." More generally, if the state is $\exp(-\beta_0 P_0-\beta_1 P_1)$, then the quantity $1/\beta_0$ is a reasonable guess about what the author/speaker might mean by "temperature." Applied to (2), this would give $1/(\beta\cosh\theta)$ for the temperature. Or the author/speaker might use "temperature" to refer instead to the appearance of the radiation emitted by the thermal body, as perceived by an observer in some specific location. Then the temperature depends on the observer's location: the radiation in the boosted frame is not isotropic, because it depends on the boost direction. We could also consider other definitions, which may give other answers. Words are not always used consistently, and nothing I say here is going to fix that eternal problem.
{ "domain": "physics.stackexchange", "id": 75366, "lm_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, temperature", "url": null }
convection, radiosounding rain in soundings is that the lower troposphere is saturated by water. Individual saturated levels would imply moisture, but if the moisture doesn't reach the surface then it maybe just clouds or rain that evaporates before reaching surface (virga). The deeper the saturated layer, the better indicator for rain it is. The dew point and ambient temperature doesn't necessarily have to be exactly the same, but very close to each others.
{ "domain": "earthscience.stackexchange", "id": 1163, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "convection, radiosounding", "url": null }
python, sql, postgresql, discord (sql_queries basically is just a function for executing each statement one after the other then commit) Then i use on_message event from discord.py that executes this part of the code: @commands.Cog.listener() async def on_message(self, message): if message.content == '': #or message.author.id == self.logbot.user.id: return guild_id = message.guild.id author_id = message.author.id at_time = message.created_at statement = f""" INSERT INTO guild{guild_id}_members (user_id) VALUES ('{author_id}') ON CONFLICT DO NOTHING; """ sql_query(self.conn, statement) statement = f""" SELECT id FROM guild{guild_id}_members WHERE user_id = '{author_id}'; """ member_id = int(sql_select(self.conn, statement)[0]) print(f'{member_id}') statement = f""" INSERT INTO guild{guild_id}_messages (member_id, at_time, message) VALUES ('{member_id}', '{at_time}', '{message.content}') """ sql_query(self.conn, statement)
{ "domain": "codereview.stackexchange", "id": 41431, "lm_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, sql, postgresql, discord", "url": null }
waves Title: Transverse wave oscillations When a wave particle oscillates, the kinetic energy at extreme positions is zero while at mean positions it's maximum... shouldn't it be the other way round as at extreme positions the velocity is the greatest? If the particle is moving with simple harmonic motion then the relationship between velocity $v$, displacement $x$ and amplitude $A$ is. $v^2= \omega^2(A^2-x^2)$ where $\omega = \frac{2\pi}{\text{period}}$ Note that the velocity is a maximum when the displacement is zero. This equation comes from the use of the conservation of energy where at all times the total energy of the system $(\frac 12 m \omega^2 A^2$) is equal to the potential energy $(\frac 12 m \omega^2 x^2$) plus the kinetic energy $(\frac 12 m v^2)$ where $m$ is the mass of the particle.
{ "domain": "physics.stackexchange", "id": 49548, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "waves", "url": null }
optics, reflection, refraction, geometric-optics Will angle of reflection be same as angle of incidence (as given by law of reflection) ? Rays are not "physical", they are mathematical/geometrical concepts to help us visualize what happens. Rays are the gradients of the propagating equal phase wave-fronts in the high frequency asymptotic regime. In a situation you are describing to understand what happens you should not just take a ray but a bunch of them, a pencil of rays. Assuming the ray shown is one of the gradient of the incoming plane wave-fronts, these should come parallel at the same incident angle both at the reflecting and at the refracting surface. Then you will immediately see that those rays above first will reflect followed by a refraction, the rays "below" will first refract followed by reflection. Since this discontinuity is also affecting the wave-front itself from which the rays derive there will be no ray of such ambiguity, the single wave-front is split into two. This is the sort of question that is only resolved
{ "domain": "physics.stackexchange", "id": 95357, "lm_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, reflection, refraction, geometric-optics", "url": null }
special-relativity, energy, mass-energy, matter Part of my interest is speculation on the Fermi problem; if large civilizations even in distant galaxies used the most readily-available source of energy we are aware of (stars) via, say, dyson swarms, we would notice a spectrum change tipping us off to that, and haven't. But if they've discovered some way to just convert matter directly to energy, stellar energy might be passe for them, and they could be flying around their stars using relatively invisible energy sources. Some theories do allow baryon number violation, but they do conserve $B-L$, or the difference in baryon number and lepton number. Under such a physics, proton decay is possible: $$ p \rightarrow e^+ + \pi^0$$ followed by: $$\pi^0 \rightarrow \gamma\gamma$$ In bulk hydrogen, the position would then undergo annihilation with the atomic electrons: $$ e^+ + e^- \rightarrow \gamma\gamma$$ (Note, there these are the main decay channels, and are not meant to be comprehensive).
{ "domain": "physics.stackexchange", "id": 72265, "lm_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, energy, mass-energy, matter", "url": null }
below calculates the area of a rectangle, given coordinates of its vertices. • The diagonals are congruent. The length of the sides of a quadrilateral do not provide sufficient information to find its area. Solution: Given that: a = 4m Area of square = a 2 = 4 × 4 = 16 m 2. Case 4: Find the perimeter of a. Here it is: If,-/0 is a cyclic quadrilateral, whose sides have lengths 9,:,;, and <, then if = 4 7 9 1:; < 8 >? is the semiperimeter, its area is given by: 6'7,- / 0 [email protected])A 7 =B 9 8:; < C Notice that from Brahmagupta’s formula it is trivial to deduce Heron’s formula for the area of any triangle. 6 Solve real - world and mathematical problems involving area, volume and surface area of two- and three-dimensional objects composed of triangles, quadrilaterals, polygons, cubes, and right prisms. Java: Area of a rectangle. By the law of cosines, I can easily find my opposite angle (using the diagonal as a basis for the equation). However, there is little literature that
{ "domain": "libreriaperlanima.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540710685614, "lm_q1q2_score": 0.8203265270534676, "lm_q2_score": 0.8376199694135332, "openwebmath_perplexity": 397.8997762975636, "openwebmath_score": 0.6196985244750977, "tags": null, "url": "http://aufr.libreriaperlanima.it/area-of-a-quadrilateral-given-4-sides-only.html" }
scala def shutDown() {actor ! EVENT_SHUTDOWN} def postEvent(event: EFLEvent) { logger.trace("[EventService.postEvent] ({}) posting: {}", context.name, event.name, "") actor ! event } def postDelayedEvent(event: EFLEvent, delay: Int) { Schedule.schedule(actor, event, Helpers.TimeSpan(delay)) } def registerForEvent(name: String, callback: (EFLEvent) => Unit): EventRegistration = { logger.trace("[EventService.registerForEvent] ({}) registering for: {}", context.name, name, "") val registration = new SimpleRegistration(name, callback) val message = new SimpleRegistrationMessage(registration) actor ! message registration } def registerConditionallyForEvent(name: String, callback: (EFLEvent) => Unit, condition: (String, Any)): EventRegistration = { val result = new ConditionalRegistration(name, callback, condition) val message = new ConditionalRegisterMessage(result) actor ! message result }
{ "domain": "codereview.stackexchange", "id": 7267, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scala", "url": null }
inorganic-chemistry Title: The difference between hydroxide and oxyhydroxide I cant discern these two terminologies. Would someone be very kind to help me on it? I think hydroxide mean M(OH)x where M is a metal ion, while oxyhydroxide means something like MO(OH). Is that right? Oxyhydroxide equals to oxide-hydroxide. Yes, you have correct idea. Oxyhydroxide is any mixed oxide and hydroxide. For example Iron(III) oxide-hydroxide While in hydroxide hydrogen and oxygen atom are joined with covalent bond.
{ "domain": "chemistry.stackexchange", "id": 17936, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry", "url": null }
java, enum, lambda /** * Reverses the <code>E &#8594; T</code> mappings of <code>map</code>. * * @param map the {@link Map} to derive the mappings from. * @return a {@link Map} with mappings <code>T &#8594; E</code>. * @throws DuplicateKeysException if there is more than one <code>E &#8594; T</code> mapping, * producing duplicate keys. */ public static <T, E extends Enum<E>> Map<T, E> createReverseEnumMap(final Map<E, T> map) { validateArguments(map); return doMap(map.entrySet(), Entry::getValue, Entry::getKey, true); }
{ "domain": "codereview.stackexchange", "id": 19344, "lm_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, enum, lambda", "url": null }
neural-networks, datasets Title: Data-set values feature scaling: sigmoid vs tanh As many papers point out, for better learning curve of a NN, it is better for a data-set to be normalized in a way such that values match a Gaussian curve. Does this process of feature normalization apply only if we use sigmoid function as squashing function? If not what deviation is best for the tanh squashing function? It has little to do with activation functions. Say you have a 2 input Neural Net with 1 node in the hidden layer and 1 node in the output layer all with the sigmoid activation function. Say suppose we are solving a bipolar classification problem. Now say one of the inputs is in the order of 10^4 and the other in order of 10 only. Now the Neural Net will propagate this values to the output layer via the hidden layer. You get an error delta which is propagated back to the input layer.
{ "domain": "ai.stackexchange", "id": 419, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, datasets", "url": null }
value. The official dedicated python forum I'm having trouble defining an algorithm that can solve a system of linear equations with binary variables. Solving a system of stiff ODEs. The solution to linear equations is through matrix operations while sets of nonlinear equations require a solver to numerically find a solution. We'll take the second equation x 1 + x 2 = 9 and solve it for x 2 = 9 - x 1. Solve system of polynomial equations with Python. Introduction to Python Preview 2. I modified the code from the zombie invasion system ( link above ) to demonstrate how it should be written. Let's say we have the same system of equations as shown above. 2x + 5y - z = 27. Solving a discrete boundary-value problem in scipy examines how to solve a large system of equations and use bounds to achieve desired properties of the solution. Consider the following equation: ( a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33) ( x 1 x 2 x 3) = ( b 1 b. y″′ + 6y″ + y. Solving a system of stiff ODEs.
{ "domain": "martinezgebaeudereinigungkoeln.de", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632234212403, "lm_q1q2_score": 0.8032727162840214, "lm_q2_score": 0.843895106480586, "openwebmath_perplexity": 457.9827500926302, "openwebmath_score": 0.5354330539703369, "tags": null, "url": "http://martinezgebaeudereinigungkoeln.de/solve-system-of-equations-python.html" }
r, xgboost, loss-function, metric, objective-function # XGBoost Matrix dtrain <- xgb.DMatrix(data=as.matrix(train[,-1]),label=as.matrix(train[,1])) dtest <- xgb.DMatrix(data=as.matrix(test[,-1]),label=as.matrix(test[,1])) watchlist <- list(eval = dtest) # Custom objective function (squared error) myobjective <- function(preds, dtrain) { labels <- getinfo(dtrain, "label") grad <- 2*(preds-labels) hess <- rep(2, length(labels)) return(list(grad = grad, hess = hess)) } # Custom Metric evalerror <- function(preds, dtrain) { labels <- getinfo(dtrain, "label") u = (preds-labels)^2 err <- sqrt((sum(u) / length(u))) return(list(metric = "MyError", value = err)) } # Model Parameter param1 <- list(booster = 'gbtree' , learning_rate = 0.1 , objective = myobjective , eval_metric = evalerror , set.seed = 2020)
{ "domain": "datascience.stackexchange", "id": 10881, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, xgboost, loss-function, metric, objective-function", "url": null }
quantum-mechanics, electromagnetism, classical-mechanics, electromagnetic-radiation, quantum-spin Note that there are situations when intense light might need a quantum mechanical description (such as when you want to understand the properties of scattered radiation, or when dealing with non-classical states of light like squeezed states). But you typically don't need to deal with quantized light fields to model the internal dynamics of atoms, even if the radiation is weak. You just need that the incident radiation is classical i.e., in a thermal or coherent state (the output of a light bulb or laser, respectively). Technically deriving spontaneous emission requires a quantum mechanical treatment of light, but the results of such derivations can be added to a model by hand. There are all sorts of caveats and specific situations in which you might not be able to get away with classical light after all; it depends a lot on what you are trying to calculate and how accurate you want to be. But a classical approximation certainly sounds like a good starting point in your case.
{ "domain": "physics.stackexchange", "id": 90994, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, electromagnetism, classical-mechanics, electromagnetic-radiation, quantum-spin", "url": null }
68 questions linked to/from Highest power of a prime $p$ dividing $N!$ 2k views ### How come the number $N!$ can terminate in exactly $1,2,3,4,$ or $6$ zeroes but never $5$ zeroes? [duplicate] Possible Duplicate: Highest power of a prime $p$ dividing $N!$ How come the number $N!$ can terminate in exactly $1,2,3,4,$ or $6$ zeroes but never $5$ zeroes? 3k views ### Prime powers that divide a factorial [duplicate] If we have some prime $p$ and a natural number $k$, is there a formula for the largest natural number $n_k$ such that $p^{n_k} | k!$. This came up while doing an unrelated homework problem, but it is ... 3k views ### Exponent of Prime in a Factorial [duplicate] I was just trying to work out the exponent for $7$ in the number $343!$. I think the right technique is $$\frac{343}{7}+\frac{343}{7^2}+\frac{343}{7^3}=57.$$ If this is right, can the technique be ... 5k views ### What is the largest power of 2 that divides $200!/100!$. [duplicate]
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969698879861, "lm_q1q2_score": 0.8455626583558778, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 323.635828845611, "openwebmath_score": 0.9610375165939331, "tags": null, "url": "https://math.stackexchange.com/questions/linked/141196" }
Hence the total is 24+15+6=45 This is the total for this interpretation of the question. If the variables must have different values, then we must subtract the three with the repeated digit 1, the three with the repeated digit 2, the three with the repeated digit 3, the three with the repeated digit 4, and the three with the repeated digit 5, getting 45-15=30 with all 3 digits different, in other words.... combinations of the digits, where the digits are selections of 3 from the 8 available in that case, in such a way that they sum to 11. Looking at Soroban's analysis in another way *****|*|***** The red lines can move 4 places left and 4 places right, giving an additional 8 solutions to the 1 shown....8+1=9 solutions containing the digit 1. ****|**|***** The red lines can move 3 places left and 4 places right, giving 7+1=8 solutions containing the digit 2. ****|***|**** The red lines can move 3 places left and 3 places right giving 6+1=7 solutions with the digit 3.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639636617015, "lm_q1q2_score": 0.8679072190435781, "lm_q2_score": 0.8933093975331751, "openwebmath_perplexity": 1391.4725836872863, "openwebmath_score": 0.7436730861663818, "tags": null, "url": "http://mathhelpforum.com/discrete-math/123546-equation-problem-others.html" }
If anyone has any proof please tell me and provide link to site confirming it. Especially if it is not continuous at 0. Last edited: Sep 11, 2005 2. Sep 11, 2005 ### lurflurf |x| is continous everywhere (including 0) and has a continuous derivatives of all orders everywhere except 0. The proof is obvious since |x|=-x x<0 |x|=x x>0 x and -x clearly have continuous derivatives of all orders |0+|=|0-|=|0|=0 so we have |x| is continuous everywhere f'(x)=-1 x<0 f'(x)=1 x>0 so f'(x) does not exist at 0 so is not continuous likewise higher derivatives 3. Sep 11, 2005 ### master_coda Alright, let $f(x)=\lvert x\rvert$. So, given any $\varepsilon>0$ take $\delta=\varepsilon$. Then if $\lvert x-0\vert<\delta$ then $\lvert f(x)-f(0)\rvert=\lvert f(x)\rvert<\varepsilon$ and so $\lim_{x\rightarrow 0}f(x)=0=f(0)$ and therefore f(x) is continuous at x=0. 4. Sep 11, 2005 ### James R Is it true that a function f(x) is continuous at x=a if:
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936101542133, "lm_q1q2_score": 0.8478342520526447, "lm_q2_score": 0.8615382147637196, "openwebmath_perplexity": 1578.1391605219733, "openwebmath_score": 0.7094414830207825, "tags": null, "url": "https://www.physicsforums.com/threads/abs-value-of-x-continuous-debate.88543/" }
c++, chess for(auto & from : moverPieces()){ for(auto & to : possibleMoves(from.first)){ ChessBoard branch = *this; branch.makeMove(from.first,to); Move option = branch.minimax(depth-1, !minimize); if((option.score > best_move.score && !minimize) || (option.score < best_move.score && minimize)){ best_move.score = option.score; best_move.from = from.first; best_move.to = to; } } } return best_move; } void AIMove(){ bool minimize = turn == Turn::black ? true : false; Move m = minimax(4,minimize); makeMove(m.from,m.to); printBoard(); } };
{ "domain": "codereview.stackexchange", "id": 27074, "lm_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++, chess", "url": null }
java, constants public final static class ColumnIds { public static final String TITLE_COLUMN_ID = "title"; public static final String TYPE_COLUMN_ID = "type"; public static final String LIFECYCLESTATUS_COLUMN_ID = "lifecyclestatus"; public static final String INSERTIONTIMESTAMP_COLUMN_ID = "insertionTimestamp"; } public final static class Columns { public static final TextColumnBuilder<String> TITLE = col.column( "Title", ColumnIds.TITLE, type.stringType()); public static final TextColumnBuilder<String> LIFECYCLESTATUS = col.column( "Lifecycle Status", ColumnIds.LIFECYCLESTATUS, type.stringType()); public static final TextColumnBuilder<String> TYPE = col.column("Type", ColumnIds.TYPE, type.stringType());
{ "domain": "codereview.stackexchange", "id": 29797, "lm_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, constants", "url": null }
The ideas you expressed in your last post are all correct, nicely done! What you've determined is that for $1\leq y\leq 4$, we must compute $$\frac{2}{9}\int_{-\sqrt y}^{1}(x+2)dx.$$ As I mentioned before, there is another way to solve this problem. Since this method is important to be aware of, I'll go through it here.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850872288502, "lm_q1q2_score": 0.8336244652662785, "lm_q2_score": 0.8479677660619633, "openwebmath_perplexity": 403.1634564432507, "openwebmath_score": 0.7496365904808044, "tags": null, "url": "https://mathhelpboards.com/threads/integral-limits-when-using-distribution-function-technique.27470/" }
geometry, calculus, approximations Remember that when we say that the volume element is: $$ dV = 4\pi r^2 dr \tag{1} $$ We are talking about the limit in which $dr \rightarrow 0$. If $dr$ is extremely small then $dr^2$ is extremely extremely small and $dr^3$ is extremely extremely extremely small. So in the limit of $dr \rightarrow 0$ we can simply ignore the higher powers and your full equation turns into equation (1).
{ "domain": "physics.stackexchange", "id": 38534, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geometry, calculus, approximations", "url": null }
lambda-calculus, term-rewriting-systems Title: Composition in explicit substitutions In the classical λσ calculus of explicit substitutions, there is the following rewrite rule: (a[s])[t] ==> a[s ∘ t]
{ "domain": "cstheory.stackexchange", "id": 3623, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lambda-calculus, term-rewriting-systems", "url": null }
$1,1,1,2,2$ Their average is $\frac{7}{5}$. But if you take it as $1,1,1$ and $2,2$, and average the averages, you get a different result. But, what you said works if the number of numbers is a power of $2$ and you split into two equal sized sets. Interestingly, this observation was used by Cauchy to give an inductive proof of the $\text{AM} \ge \text{GM}$ inequality! The correct answer is that it depends. The average of averages is only equal to the average of all values in two cases: 1. if the number of elements of all groups is the same; or 2. the trivial case when all the group averages are zero As hinted in the comments, your proof is not enough to answer the question as your calculations only prove one particular case in which the sets have the same size (thus you arriving at the incorrect answer). You need to generalize your math to account for all cases. Below is my attempt at it.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750387190131, "lm_q1q2_score": 0.8102563090078437, "lm_q2_score": 0.8499711794579723, "openwebmath_perplexity": 267.5910200881133, "openwebmath_score": 0.8111160397529602, "tags": null, "url": "https://math.stackexchange.com/questions/115091/is-the-average-of-the-averages-equal-to-the-average-of-all-the-numbers-originall" }
python, generator Next we can define a dictionary to store the result of the first call to format_value and format_values. And then change the code to iterate over the dictionary. Final code: import textwrap def format_value(fmt, head=True): def inner(config, name): return ([f"{name}: "] if head else []) + [fmt(config[name])] return inner def format_values(fmt): def inner(config, name): return [f"{name}:"] + [fmt(value) for value in config[name]] return inner wrapper = textwrap.TextWrapper(subsequent_indent='\t', width=120) star = "*"
{ "domain": "codereview.stackexchange", "id": 41241, "lm_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 }
machine-learning, neural-network, deep-learning, cnn Traffic lights are not pure red, green or yellow. They may have intensity differences which will get reflected in the image matrix. CNN can capitalise on those differences. The weights of CNN filters are randomly initialised, so given you have a large data-set CNN will eventually learn which out of the R,G,B channel is contributing to a specific colour. Also intuitionally a Traffic Signal is not a light only. It consists of a 3 light device. Consider this, a B/W image is shown to you of a Traffic Light in which a particular colour is on and the colour label is known. You will associate the colour label with the position of the bulb, even though you do not know the colour. Same will happen in a CNN, if the channels have identical values for each colour CNN will learn to recognise from the position of the bulb.
{ "domain": "datascience.stackexchange", "id": 3647, "lm_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, deep-learning, cnn", "url": null }
electromagnetism, forces, magnetic-fields, vectors, conventions After making this convention change, all of our pseudovectors would indeed suddenly change direction - but none of them have a directly physically measurable direction anyway. You might say "Nonsense - there are certainly sensors that measure the direction of a magnetic field." But they don't directly measure it (although that claim will probably unleash philosophical debates about the meaning of the phrase "directly measure"). Instead, the sensor internally takes a second cross product of a test charge’s velocity and the magnetic field, and measures the direction of the resulting true (polar) Lorentz force vector. So, as long as you consistently use the left-hand rule, you'd still get the same polar force vector inside your sensor, and only your interpretation of its reading would need to change.
{ "domain": "physics.stackexchange", "id": 91227, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, forces, magnetic-fields, vectors, conventions", "url": null }
php, pdo, concurrency, postgresql { $success = false; $count = 0; $this->beginTransaction($isolationLevel); $this->exec("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"); try { while (!$success && $count < 5) { try { $callable(); $success = $this->commit(); } catch (\PDOException $e) { if ($e->getCode() == '40001') { // Serialized transaction failure. Try again. } elseif ($e->getCode() == '25P02') { // "In failed sql transaction." Rollback and try again. $this->rollback(); $this->beginTransaction($isolationLevel); } else { throw $e; } } $count++; } } catch (\Exception $e) { if ($this->inTransaction()) { $this->rollback(); } throw $e; } if (!$success) {
{ "domain": "codereview.stackexchange", "id": 20691, "lm_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, pdo, concurrency, postgresql", "url": null }
Use Markov chains. The nice part of Markov Chains is that they can be applied to a huge class of similar problems with relatively little thought (it's almost formulaic in application). It's also the most intuitive way to handle these problems. (in Matlab code notation below) %% setup full transition matrix with states from zero heads to 5 heads T = $[ones(5,1)*.5,eye(5)*.5];$ $T = [T;zeros(1,6)]$ %%Take subset "Q" comprised of just transient states (5 heads is absorbing state) $Q = T(1:end-1,1:end-1);$ $M = inv(eye(5)-Q)$ absorbing Markov Chain has a similar example as this question BTW... ans = 62 60 56 48 32 Where each row is the expected number of steps before being absorbed when starting in that transient state (0 through 4 heads, top to bottom). I’m slightly surprised that no one has suggested this solution yet in such a highly active question.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137905642982, "lm_q1q2_score": 0.8005695514680632, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 235.68330870479673, "openwebmath_score": 0.636867105960846, "tags": null, "url": "https://math.stackexchange.com/questions/364038/expected-number-of-coin-tosses-to-get-five-consecutive-heads?noredirect=1" }
classical-mechanics, forces, friction If there is no substantial tension in the string, then we say it is "slack" as it sags down slightly. It will only become not-slack as it stretches taut and then subtly lengthens; it will then experience some tension as a function of how long it starts and how long it gets. To a crude approximation this force is $$T(x) = \frac{Y~A}{L_0}~(x - L_0) \text{ if } L_0 < x < L_\text{max} \text{ else } 0.$$ It is zero for $x < L_0$ because the string only supports tension, not compression; it is zero for $L_\text{max} < x$ because the string breaks. In practice as the string gets closer to breaking it usually gets stiffer as it stretches out, which would be something like $k_1~(x - L_0) + k_2 (x - L_0)^2 + \dots$ but if we are nowhere near the breaking point then we do not need this extra mathematics. Technically we can of course combine together $k = Y A/L_0$ into a "spring constant" but I have written it this way because $Y$ is a material parameter called the "Young's modulus" if $A$ is the
{ "domain": "physics.stackexchange", "id": 42382, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, forces, friction", "url": null }
formal-languages, semantics PS In the comments I hear that semantics does not mean another language or translation into it. But Formal Semantics for VHDL says that if you understand something in only one way then you do not understand it and "meaning of meaning" can be specified if we supply a language with a mechanism that translates it into another (known) language. That is, "semantics is a Relation between formal systems". Hennessy, in Semantics of Programming Languages, says that semantics allows for formal processing of the program "meaning", when semantics is supplied as BNF or Syntax Diagram. What is a formal system if not a language? PS2 Can I say that HW synthesis of given HDL program into interconnection of gates, is a process of semantics extraction? We translate (high-level) description into the (low-level) language that we understand, afterwards. Why not to learn semantics of C right away instead of inventing another language, for describing semantics of C?
{ "domain": "cs.stackexchange", "id": 639, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, semantics", "url": null }
slam, navigation, turtlebot, ros-groovy I am not sure how to proceed next. This is a very beginner question so I was hoping someone could help me out? Originally posted by nemesis on ROS Answers with karma: 237 on 2013-12-09 Post score: 0 After you have done the beginner tutorials. I would do the tutorials in tf ( manages coordinate transforms) http://wiki.ros.org/tf/Tutorials There are some tutorials here http://wiki.ros.org/Robots/TurtleBot then have a look at the gmapping package, it will work with the create. It uses a 2D laser scanner and wheel odometer which the create has. There are packages to fake a 2D lidar using the kinect. Originally posted by Sentinal_Bias with karma: 418 on 2013-12-09 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 16400, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, turtlebot, ros-groovy", "url": null }
java, beginner, strings, programming-challenge The code passes the majority of the tests without the first if statement, so that was included to ensure it passes circumstances such as an input of xxxx. Without this statement, xxxx returns x, which is incorrect. My questions are:
{ "domain": "codereview.stackexchange", "id": 23491, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, strings, programming-challenge", "url": null }
python, performance, python-2.x, community-challenge letter_padding = len(num_2_alpha(len(basin_list))) sep1 = ' '*(len('letter')-letter_padding) size_padding = len(str(basin_list[0].size)) sep2 = ' '*(len('Size')-size_padding) basin_string = 'Letter Size Sink\n' for i, basin in enumerate(basin_list): basin_string += '''{:>{}} {} {:{}d} {} {} '''.format(num_2_alpha(i), letter_padding, sep1, basin.size, size_padding, sep2, basin.sink) return basin_string def create_height_map(filename): ''' Input: a filename with a textfile formated as 1 5 2 2 4 7 3 6 9 Ouputs a matrix of the height map. ''' file = open(filename, 'r') matrix = np.matrix([map(int, line.split()) for line in file]) file.close() return matrix
{ "domain": "codereview.stackexchange", "id": 21593, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-2.x, community-challenge", "url": null }
lead to models years — when half the patients are expected survive is in the plot! Different curves are not this reduces our sample size from 137 to 122, because censoring in survival data makes. Data sets used are found in tests is smooth ; in we they tend to leave study... M., Clark, S B Love, S. & should n't be taken to mean the length time. Though it is commonly interpreted as such using today include: time-to-event data that consist of a dataset! Subjects who didn’t have the event before 10 years to restrict the calculation the... Beats 2, area ‘a’ ) and the printed standard errors are an underestimate when. Is random, values for different curves are not this reduces our sample size from 137 to 122 time ART. Sex and age were coded as numeric variables landmark analysis or a time-dependent covariate survival.! The fact that the censoring distribution for an individual does not depend on what value is chosen for the survival! ( e.thumbw ) ; e.thumbh = e.thumbhide > =pw using
{ "domain": "santafestereo.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9416541626630935, "lm_q1q2_score": 0.826279681641076, "lm_q2_score": 0.877476800298183, "openwebmath_perplexity": 2282.1390879140604, "openwebmath_score": 0.5358961820602417, "tags": null, "url": "http://www.santafestereo.com/anne-of-vffbrfd/d101b7-mean-survival-time-in-r" }
javascript, caesar-cipher, ecmascript-6 const rot13 = (str) => str ? (code(str) < 65 || code(str) > 90) ? head(str).concat(rot13(tail(str))) : String.fromCharCode((((code(str) - 65)) + 13) % 26 + 65).concat(rot13(tail(str))) : ''; It works fine, I only want to know if there is performance issues, and what can I do to improve my code? I don't know about the performance, but readability-wise, cramming that double-nested ternary on a single line of code isn't, well, ideal. Give it some [vertical] air: const rot13 = (str) => str ? (code(str) < 65 || code(str) > 90) ? head(str).concat(rot13(tail(str))) : String.fromCharCode((((code(str) - 65)) + 13) % 26 + 65).concat(rot13(tail(str))) : '';
{ "domain": "codereview.stackexchange", "id": 18624, "lm_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, caesar-cipher, ecmascript-6", "url": null }
performance, css, file, coldfusion $ npm install --global gulp-cli // gives you access to gulp on the command line $ mkdir gulp-sass-demo && cd gulp-sass-demo // or any dir name you prefer. Make sure you don't name it "gulp-sass" though, because this is the name of a plugin we are going to use and npm will not allow you to install the plugin in a folder with the same name. $ npm init // initiates npm on this directory--just hit enter for every question--at the end of the process you should have a "package.json" file, which holds important information about your node project $ npm install --save-dev gulp gulp-sass // saves these two node modules as dev dependencies, meaning dependencies you need to develop the app but not to run it.
{ "domain": "codereview.stackexchange", "id": 24860, "lm_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, css, file, coldfusion", "url": null }
quantum-field-theory, dirac-equation If I didn't understand the actual maths and its connection with physics and someone gave me vague linguistic descriptions such as yours, I wouldn't know what to think and I would tend to think that the writer is confused. After all, I think you are confused even here, in the non-hypothetical world. If I could check what's behind these statements, I would realize it's a valid theory whether it was written down by Bollinger or Dirac.
{ "domain": "physics.stackexchange", "id": 14090, "lm_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, dirac-equation", "url": null }
• Honest question: why isn't that rigorous enough? What's wrong with it? – Randall Sep 5 '18 at 17:14 • @Randall: I was just wondering. I guess I would accept the answer saying that there is not other "more rigorous" definition. I know that some clear things (like functions) actually have set theoretic definitions. So I was wondering if there is some more rigorous definition of this finite sum. – John Doe Sep 5 '18 at 17:16 • I think an inductive definition will do it, like $\sum\limits_{i=1}^0 a_i=0$ and $\sum\limits_{i=1}^{n+1} a_i = \left(\sum\limits_{i=1}^n a_i\right) + a_{n+1}$. – lisyarus Sep 5 '18 at 17:17 This can be done inductively—what follows is a completely over-the-top way of doing it.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759632491111, "lm_q1q2_score": 0.8486775020152576, "lm_q2_score": 0.8652240791017536, "openwebmath_perplexity": 699.8473695557884, "openwebmath_score": 0.9974599480628967, "tags": null, "url": "https://math.stackexchange.com/questions/2906506/rigorous-definition-of-sum-i-1n-a-i" }