text
stringlengths
1
1.11k
source
dict
It also explained A line parallel to one side of a triangle divides the other two proportionally. Is this also another theorem? • It is the old old Thalès theorem. – hamam_Abdallah May 24 '17 at 22:09 • @Salahamam_Fatima I though the Thales theorem was "The diameter of a circle always subtends a right angle to any point on the circle" – Pablo May 24 '17 at 22:12 • This sounded so odd to me, I just had to check it out... Turns out english-speakers now call it the intercept theorem: en.wikipedia.org/wiki/Intercept_theorem I've personally always called that the Thalès theorem. I've never given a name to the property you mentioned about right angles and diameters. – N.Bach May 25 '17 at 12:09 Notice the red triangle and the blue triangle are similar as the two sides of the blue triangle (6.4 and 6.0) are half of the sides of the red triangle (2x6.4 and 2x60) and they share an angle. So the green angles are congruent. So the lines are parallel.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534398277177, "lm_q1q2_score": 0.8113791382270853, "lm_q2_score": 0.8267117983401363, "openwebmath_perplexity": 469.02826342883753, "openwebmath_score": 0.5343447923660278, "tags": null, "url": "https://math.stackexchange.com/questions/2295515/why-does-a-line-bisector-create-parallel-lines" }
quantum-field-theory, particle-physics, electrons, dirac-equation, protons $$ -(e/2M) \left (\frac{1}{2} F^{\mu\nu} \bar \psi \sigma _{\mu\nu}\psi\right ), $$ perhaps to be added to the above Gordon current piece (which would vanish for the neutral neutron! whose magnetic moment was measured by Alvarez & Bloch, 1939), for a phenomenological parameter M. He would fit everything to determine M for experimentally determined nuclear magnetons; note is not the nucleon's mass, but merely of its rough order of magnitude; and hope for the future to clarify things. Not having a clue about the mysteries of nature, he'd leave it at that. The late 40s revolution in renormalization allowed computation of corrections to the g of the electron; but, due to non-renormalizability, not for the nucleon, what with the above nasty dimension-5 spatchcocked Pauli term, with its mystery scale M. (As an aside, this term is dear to the heart of extended-supergravitists, M being the Planck scale.)
{ "domain": "physics.stackexchange", "id": 61475, "lm_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, electrons, dirac-equation, protons", "url": null }
python from rospy import init_node, is_shutdown if __name__ == '__main__': init_node('input_test') while not is_shutdown(): print "gimme something, please?" something = raw_input() print "thanks for giving me " + something compiling this node and then running it leads to gimme something, please? beer thanks for giving me beer gimme something, please? box thanks for giving me box gimme something, please? plant thanks for giving me plant gimme something, please? If this doesn't work for you, update your question with your code and error messages. Originally posted by goetz.marc with karma: 203 on 2013-05-28 This answer was ACCEPTED on the original site Post score: 4 Original comments Comment by askkvn on 2019-06-14: Are you trying to run this python file with rosrun or with roslaunch?
{ "domain": "robotics.stackexchange", "id": 14316, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
Since $\big|\binom{1/n}{k} \frac{1}{kn+1}\big| < \frac1{kn(kn+1)}$, $|f(v, n)| <\sum_{k=2}^{\infty} \frac1{kn(kn+1)} <\frac1{n^2}\sum_{k=2}^{\infty} \frac1{k^2} <\frac1{n^2}$. The first term of $f(v, n)$ is $\binom{1/n}{2}\frac{1}{2n+1} =\frac{(1/n)(1/n-1)}{2}\frac{1}{2n+1} =-\frac{n-1}{2n^2(2n+1)}$ and this is between $-\frac1{8n^2}$ and $-\frac1{4n^2}$ for $n > 3$. Therefore the first two terms of the expansion of $\int_0^v (1+x^n)^{1/n}\, dx$ are both of order $1/n^2$, so we have to consider the whole sum, not just the first term (after $1$). Since $\int_0^v (1+x^n)^{1/n}\, dx =v+\frac{v^{n+1}}{n(n+1)}+v^{2n+1}f(v, n)$ and all the terms exist as $v \to 1$, $\int_0^1 (1+x^n)^{1/n}\, dx -1-\frac{1}{n(n+1)}=f(1, n)$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718456529513, "lm_q1q2_score": 0.8411925402842678, "lm_q2_score": 0.8499711737573762, "openwebmath_perplexity": 1282.5247644319709, "openwebmath_score": 0.9997743964195251, "tags": null, "url": "http://math.stackexchange.com/questions/435079/the-value-of-lim-limits-n-rightarrow-inftyn2-left-int-01-left1xn-right" }
data-structures, logic, satisfiability, binary So is there a way to construct a cnf formula, which does the same? Yuval describes the general approach. Let the binary representation of the two numbers be $n_1,\dots,n_k$ and $m_1,\dots,m_k$, where $n_1$ is the most significant bit. Introduce fresh new boolean variables $t_1,\dots,t_k$. The intention is that these will indicate the common prefix of $n,m$. In particular, add the following clauses:
{ "domain": "cs.stackexchange", "id": 14836, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, logic, satisfiability, binary", "url": null }
electromagnetic-radiation, photons, interference, superposition, interactions Interference, you can see this from the double slit experiment, done by shooting single photons at a time. Emphasis on single photons. What interferes with what? You just shot a single photon. The pattern arises only if you repeat the experiment, and shoot many photons after each other. The boundary conditions are all the same, and each photon that is shot from the same setup laser, the interference will show up, showing an interference between the photons that were actually shot after each other. https://en.wikipedia.org/wiki/Double-slit_experiment
{ "domain": "physics.stackexchange", "id": 72479, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetic-radiation, photons, interference, superposition, interactions", "url": null }
cosmology, space-expansion, observable-universe A similar question might be: if none of the light that it emitted, at anytime in the past, is reaching us now, then none of the light that it emitted, at anytime in the past, will reach us in the future?
{ "domain": "physics.stackexchange", "id": 61220, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, space-expansion, observable-universe", "url": null }
c++, radix-sort You can even be more strict and also make the parameter size_t size const, and even local variables like max_mod inside countrad(). Use size_t consistenly for counts and indices Don't use unsigned int for counts, unless you are absolutely sure you will never have to deal with arrays with more elements than can be counted in whatever an unsigned int might be on all the platforms you want to support. Use idiomatic for-loops Why have you moved the initializer statement out of all your for-loops? In most cases this does not seem necessary at all. Just write for-loops like you normally do: auto aux = arr[0]; for (i = modpow2(size, 0, 1); i < size; i += 2) { aux = arr[i] * (aux < arr[i]) + aux * (aux >= arr[i]); aux = arr[i + 1] * (aux < arr[i + 1]) + aux * (aux >= arr[i + 1]); }
{ "domain": "codereview.stackexchange", "id": 40533, "lm_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++, radix-sort", "url": null }
java, shuffle currentIndex++; return indexList.get(currentIndex); } /** * Get the previous index. * @return -1 if failed otherwise the index. */ public int getPrevious(){ //if currentIndex is invalid if( currentIndex-1 < 0 || indexList.isEmpty() ){ return -1; } //decrement the current index so we can get the previous one currentIndex--; return indexList.get(currentIndex); } }
{ "domain": "codereview.stackexchange", "id": 8932, "lm_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, shuffle", "url": null }
ros, source, package, ros-indigo Originally posted by bluefish on ROS Answers with karma: 236 on 2015-05-11 Post score: 0 Original comments Comment by gvdhoorn on 2015-05-11: Please add what you have already tried, why, and how it failed, so you won't get answers telling you things you already know. Comment by bluefish on 2015-05-11: Thanks gvdhoorn for your help!! I edited the question. You'll probably want to read up on catkin and workspaces in the catkin tutorials. For your specific case: # make sure you have sourced the correct setup.bash file for your ROS distribution already # go to workspace src space cd /path/to/your/catkin_ws/src # checkout the desired version of the descartes repository. git clone -b indigo-devel https://github.com/ros-industrial-consortium/descartes.git # we need to make sure you have all dependencies installed. cd /path/to/your/catkin_ws rosdep install --from-paths src --ignore-src --rosdistro indigo # now build catkin_make
{ "domain": "robotics.stackexchange", "id": 21651, "lm_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, source, package, ros-indigo", "url": null }
python, strings, python-3.x, csv, bioinformatics Non_Uniques.append(Peptide_MC1) Non_Unique_Count += 1 ID_list.append(row[1][0] + ' (Not unique)') Peptide_list.append(Peptide_MC1) else: Peptide_MC1 += PrEST_seq[m:m+1]
{ "domain": "codereview.stackexchange", "id": 6043, "lm_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, strings, python-3.x, csv, bioinformatics", "url": null }
vba, excel Public Property Let CC(ByVal newCC As String) Rem Raise Error if MailItem is Nothing Me.GetMailItem.CC = newCC End Property This is just a rough muck-up. The purpose of the class is to encapsulate the methods, settings and error handling associated for working with MailItems. Avoid adding feature that are specific to the current project. These features can easily be implemented in another class or module. Keeping the logic separate from the implementation will allow you to reuse the class in many other projects. For example: Instead of hard coding an html template and having a routine that builds a specific table, you could create a Template property and a InsertHTML method. Public Property Get HTMLTemplate() As String End Property Public Property Let HTMLTemplate(ByVal newHTMLTemplate As String) End Property
{ "domain": "codereview.stackexchange", "id": 36703, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
computer-architecture, history it can be 8-bit, 16-bit, 18-bit, 24-bit, etc. It is true that most memories have a word size that is a power of 2 because most architectures are like this, not because it is simpler. Finally, the range chosen for particular encodings like sRGB is most often a compromise between precision and simplicity. When it comes to encoding audio and video, people usually do not care about have multiple of 8-bit. Many LCD panels encode pixels with 18 bits because it corresponds to what they can actually display, thus why waste wires? Architecture usually provide special hardware instruction to help with decoding, so working on bits instead of bytes is not really an issue.
{ "domain": "cs.stackexchange", "id": 9917, "lm_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, history", "url": null }
The two lines can be represented as $(5,5,4)+s[(10,10,6)-(5,5,4)]$ and $(5,5,5)+t[(10,10,3)-(5,5,5)]$. To find their intersection means to find $s$ and $t$ such that they are equal. - Thanks for the reply. When i tested this with some other points i am not getting correct values. for example if you take the lines (6,8,4)(12,15,4) and (6,8,2)(12,15,6). Please expline is there any other conserns are there to solve this problem, This will helps a lot for me. Thanks, Kumar. –  kumar Jan 5 '13 at 11:12 @kumar Apply the same method to your new example, you should solve $(6,8,4) + s(6,7,0) = (6,8,2) + t(6,7,4)$ and the answer is $s = t = 1/2$, i.e. the intersection point is $(9,\,23/2,\,4)$. I see no problems here. What do you mean by not getting correct values? –  user1551 Jan 5 '13 at 15:11
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138138113965, "lm_q1q2_score": 0.8016210382231824, "lm_q2_score": 0.8198933337131076, "openwebmath_perplexity": 165.69951668212275, "openwebmath_score": 0.9149255752563477, "tags": null, "url": "http://math.stackexchange.com/questions/270767/find-intersection-of-two-3d-lines" }
ros Title: Does every joint need an actuator and transmission? Hi all, I'm writing my own URDF-controller code for my robot. I have the URDF working well in rviz and warehouse but I can't get the controller to work. I am looking into this tutorial for a differential drive robot and I was wondering will I need actuators/transmissions for all of my motors in the joints of my robot's manipulator arms? Here is a copy of my urdf: <?xml version="1.0" ?> <robot name="H20_robot"> <link name="stand_link"> <visual> <geometry> <box size="0.20 0.10 1"/> </geometry> <origin rpy="0 0 0" xyz="0 0 -.5"/> <material name="orange"> <color rgba="1 0.5 0 1"/> </material> </visual> <collision> <geometry> <box size="0.20 0.10 1"/> </geometry> <contact_coefficients mu="0" kp="1000.0" kd="1.0"/> <origin rpy="0 0 0" xyz="0 0 -.5"/> </collision>
{ "domain": "robotics.stackexchange", "id": 12754, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
xgboost Title: xgboost reduce float precision does not reduce train time I expected that reducing the precision of my data (e.g., from int64 to int8) would speed up the training. But, even if I reduce the overall size of my dataset by 74%, I do not see an improvement. Is this expected? Changing float precision cannot make any difference as "XGBoost treats all data as 32-bit float internally."
{ "domain": "datascience.stackexchange", "id": 11222, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "xgboost", "url": null }
arduino, rosserial Title: rosserial_arduino: lost sync with device when handling interruptions I'm implementing a motor controller on Arduino connected to ROS stack via rosserial_arduino. The motors have a Hall sensor-based wheel encoders with a relatively high resolution (~3000 ticks per turn of the wheel). So I'm measuring the speed of the wheel using interrupts (one of the 2 outputs of a hall sensor is connected to interrupt pin). When I run the program and connect it to ROS with rosserial.py everything runs smoothly (I'm getting ROS messages from Arduino) till the interrupt is triggered for the first time (i.e. the wheel starts turning). At this point it seems like Arduino program is restarted (crashes?) and rosserial loses connection to it (I get "lost sync with device") I troubleshooted the problem a little bit and have minimized the code to just this: ros::NodeHandle nh; void motorInterruptLeft() { // literary just an empty function } void setup() { attachInterrupt(1, motorInterruptLeft, CHANGE);
{ "domain": "robotics.stackexchange", "id": 14926, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "arduino, rosserial", "url": null }
We want to find $c$ such that ${f}^{\prime }\left(c\right)=\frac{1}{3}.$ That is, we want to find $c$ such that $\frac{1}{2\sqrt{c}}=\frac{1}{3}.$ Solving this equation for $c,$ we obtain $c=\frac{9}{4}.$ At this point, the slope of the tangent line equals the slope of the line joining the endpoints.
{ "domain": "quizover.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9916842202936827, "lm_q1q2_score": 0.8616018092163845, "lm_q2_score": 0.8688267813328976, "openwebmath_perplexity": 389.4692698291522, "openwebmath_score": 0.8189693689346313, "tags": null, "url": "https://www.quizover.com/calculus/section/the-mean-value-theorem-and-its-meaning-by-openstax" }
terminology In ecology, the competitive exclusion principle, sometimes referred to as Gause's law of competitive exclusion or just Gause's law,[2] is a proposition that states that two species competing for the same resource cannot coexist at constant population values, if other ecological factors remain constant. When one species has even the slightest advantage or edge over another then the one with the advantage will dominate in the long term. One of the two competitors will always overcome the other, leading to either the extinction of this competitor or an evolutionary or behavioral shift toward a different ecological niche. The principle has been paraphrased into the maxim "complete competitors cannot coexist"
{ "domain": "biology.stackexchange", "id": 4859, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "terminology", "url": null }
java, console, javafx, color this.helloWorldThread = new HelloWorldThread(); this.cursorBlinkThread = new CursorBlinkThread(); } @Override public void stop() { helloWorldThread.requestExit(); cursorBlinkThread.requestExit(); try { helloWorldThread.join(); } catch (InterruptedException ex) { } try { cursorBlinkThread.join(); } catch (InterruptedException ex) { } } @Override public void start(Stage primaryStage) { Platform.runLater(() -> { try { ColorPicker textForegroundColorPicker = new ColorPicker(window.getTextForegroundColor()); ColorPicker textBackgroundColorPicker = new ColorPicker(window.getTextBackgroundColor()); ColorPicker cursorBlinkForegroundColorPicker = new ColorPicker(window.getBlinkCursorForegroundColor());
{ "domain": "codereview.stackexchange", "id": 43633, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, console, javafx, color", "url": null }
general-relativity, gravity, spacetime, coordinate-systems, curvature The second thing is that spatial curvature, even when it's noticeable, isn't in a particular direction. If you imagine making a flat sheet of paper cover the surface of a sphere, the paper will crinkle. If you use a more rigid, but still compressible object, it will compress and be under significant pressure if you force it to conform to a sphere. That pressure is the only effect you can actually detect in curved space, because all of your experiments are also confined to the sphere's surface. You can't see the object bending in the background flat space, because the background space doesn't actually exist, it's just a visualization aid.
{ "domain": "physics.stackexchange", "id": 81943, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, gravity, spacetime, coordinate-systems, curvature", "url": null }
angular-momentum, dimensional-analysis, units, rotation, angular-velocity We can do this a little more formally if we consider spatial units to be standardised quantities that can have vector, bivector, etc. geometrical properties. They are not all scalars. When we talk about "length" now we are talking about the ratio of the vector between the two points being measured and a standardised unit vector pointing in the same direction. We can legitimately divide vectors pointing in the same direction by one another and get a scalar quantity, because a scalar times a vector gives another vector that is some multiple of it. But when we divide a vector by another vector pointing in a different direction, this is no longer true. Instead we get a bivector quantity that represents a plane area in the same way vectors represent linear lengths. Bivectors are the generators of rotations. And in the case of circular motion, comparing a velocity vector in the tangential direction to the radius in the radial direction gives us a bivector quantity with an orientation
{ "domain": "physics.stackexchange", "id": 94860, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "angular-momentum, dimensional-analysis, units, rotation, angular-velocity", "url": null }
dna, bioinformatics Title: Is it possible to proccess human genome in a local computer? I have some basic programming knowledge, and I would like to take a look at my genome and search for specific sequences related to mental illness and addiction. The test costs only 1000$ in Spain and I can pay it, but I don't earn a lot of money and I would only pay for it if I could process it on my local computer with 32GB RAM. Is human DNA too much big to process at a local computer? I don't know what you mean by "process". Aligning to the human genome might be a strain on your computer, since it has to hold the whole index in memory, but I don't think you'll have to do that. If you get your genome as a fasta, that's just plain text. A vcf file with just the variants is even smaller.
{ "domain": "biology.stackexchange", "id": 12337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dna, bioinformatics", "url": null }
c++, game, c++14, opengl, snake-game glutTimerFunc(move_speed, moveSnakeAuto, 0); } void reshape(GLsizei width, GLsizei height){ UNUSED(width); UNUSED(height); // Make the window non-resizable so we don't have to worry about size changes glutReshapeWindow(600, 600); } int main(int argc, char** argv){ glutInit(&argc, argv); glutInitWindowSize(600, 600); glutCreateWindow(title); glutDisplayFunc(display); glutReshapeFunc(reshape); glutSpecialFunc(keyboard); glutTimerFunc(move_speed, moveSnakeAuto, 0); int initSize = 3; // Specify the coordinates to each part of the snake for(int a = 1; a <= initSize; a++){ std::deque<float> row; row.push_back(0.0f); row.push_back((map_half_length + 2.0f + (initSize * 2)) - (a * 2)); part_coords.push_front(row); } srand(time(NULL)); initGL(); glutMainLoop();
{ "domain": "codereview.stackexchange", "id": 20921, "lm_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++, game, c++14, opengl, snake-game", "url": null }
here we provide some useful results that help us prove if a set is countable or not. Hence these sets have the same cardinality. The cardinality of a set is denoted by $|A|$. of students who play foot ball only = 28, No. $$|W|=10$$ The intuition behind this theorem is the following: If a set is countable, then any "smaller" set $\mathbb{N}, \mathbb{Z}, \mathbb{Q}$, and any of their subsets are countable. c) $(0,\infty)$, $\R$ d) $(0,1)$, $\R$ Ex 4.7.4 Show that $\Q$ is countably infinite. If $B \subset A$ and $A$ is countable, by the first part of the theorem $B$ is also a countable the idea of comparing the cardinality of sets based on the nature of functions that can be possibly de ned from one set to another. Ex 4.7.3 Show that the following sets of real numbers have the same cardinality: a) $(0,1)$, $(1, \infty)$ b) $(1,\infty)$, $(0,\infty)$. countable, we can write a proof, we can argue in the following way. So, the total number of students in the group is 100. Thus to prove that
{ "domain": "gingerhillcreations.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9883127409715955, "lm_q1q2_score": 0.868871940560683, "lm_q2_score": 0.8791467564270272, "openwebmath_perplexity": 368.5193643402489, "openwebmath_score": 0.8577983379364014, "tags": null, "url": "https://gingerhillcreations.com/jessica-smith-scxean/ec0e3c-how-to-prove-cardinality-of-sets" }
image-processing, filters, fourier-transform, convolution %% A random kernel and image dataKernel = floor(256*rand(64,64)); dataImage = floor(256*rand(300,300)); %% Compute sizes [nRowKernel,nColKernel] = size(dataKernel); [nRowImage,nColImage] = size(dataImage); [nRowCrop] = nRowImage - nRowKernel+1; [nColCrop] = nColImage - nColKernel+1; lMatch = zeros(nRowCrop,nColCrop); dataImageCrop = zeros(size(dataKernel)); tic; for iRowCrop = 1:nRowCrop; for iColCrop = 1:nColCrop; dataImageCrop = dataImage(iRowCrop:iRowCrop+nRowKernel-1,iColCrop:iColCrop+nColKernel-1); % Crop a portion of the image lMatch(iRowCrop,iColCrop) = length(find(dataImageCrop - dataKernel == 0)); end end
{ "domain": "dsp.stackexchange", "id": 6520, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, filters, fourier-transform, convolution", "url": null }
optics, solid-state-physics, semiconductor-physics, optical-materials the precise physics that disables us from using plastic as an illumination source. Physics doesn't prevent it. Back before LEDs were cheap, it was fairly common to produce red light by putting a red-dyed glass or plastic layer in front of a white lamp. It's even still done today for some applications. For example, you can still buy gels for stage lighting that have exactly this purpose. Using LEDs is just cheaper and more efficient for many applications, given today's technology. (There are other minor differences like it's hard to find dyes that are as narrow-band as LEDs, so the light from a filtered white lamp will typically have a wider spectrum than from an LED)
{ "domain": "physics.stackexchange", "id": 100135, "lm_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, solid-state-physics, semiconductor-physics, optical-materials", "url": null }
r, numerical-methods Or if you want a matrix, just replace data.frame() with cbind(). Taking all of my comments into account, your code could look like this: elasticity <- function(x, y, bandwidth) { library(KernSmooth) x <- as.vector(x) y <- as.vector(y) loess.fun <- locpoly(x = x, y = y, bandwidth = bandwidth) plot(loess.fun, type = 'l', lwd = 2, lty = 4, ylim = c(0, 100), xlab = "Price", ylab = "Share", col = 2, main = "Local Polynomials Estimation") loess.der <- locpoly(x = x, y = y, drv = 1, bandwidth = bandwidth, gridsize = length(y)) eps <- data.frame(Price = x, Elasticity = x / y * loess.der$y) return(eps[order(eps$Price), ]) }
{ "domain": "codereview.stackexchange", "id": 21239, "lm_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, numerical-methods", "url": null }
• I am not sure why you want to go this way, but at least for orthonormal inputs you have the formula $\beta_{\text{ridge}} = \beta/(1+\lambda)$, so you can solve it knowing the original $\beta$ (see page 64 of elements of statistical learning, pdf freely available online) – seanv507 Jul 20 '17 at 17:22 • No statistically motivated reason, I'm just thinking about some gemoetrical properties. Thank you for the reference. – reicja Jul 20 '17 at 17:54 • the principles used for lasso in my answer here (stats.stackexchange.com/questions/259177) carry over to ridge – user795305 Jul 21 '17 at 3:45 • @Ben thank you. I would also ask, can one say when the solution of (1) $\hat{\beta}, \lambda$ is equaled to the solution of (2), $\tilde{\beta}, \tilde{\nu}$, given the same data set and fixed $R$? – reicja Jul 21 '17 at 8:56 • I'll answer that soon. (I'm travelling a lot lately.) Could you edit your question to include this new question? – user795305 Jul 22 '17 at 15:19
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769078156284, "lm_q1q2_score": 0.821265663801283, "lm_q2_score": 0.8418256492357358, "openwebmath_perplexity": 213.9017328925977, "openwebmath_score": 0.9959291815757751, "tags": null, "url": "https://stats.stackexchange.com/questions/292532/ridge-regression-parameter-space?noredirect=1" }
Equations to State Space Any explicit LTI difference equation (§5.1) can be converted to state-space form.In state-space form, many properties of the system are readily obtained. Ask specific questions about the challenge or the steps in somebody's explanation. It only takes a minute to sign up. In this chapter, we solve second-order ordinary differential equations of the form . Actually this kind of simultaneous differential equations are very common. ∇ ⋅ − = Difference Equations to Differential Equations. Confusion with Regards to General and Particular Solution Terminology in Differential Equations, Displaying vertex coordinates of a polygon or line without creating a new layer. Applying rudimentary knowledge of differential equations, the solution regarding only the poles should be: $$\text {Poles Diffrential}: p(t)= \sum_{i=1}^{n_1} c_ie^{t\times \text{p}_i}$$ $$\text {Poles Difference}:p[n]= \sum_{i=1}^{n_1} c_i\text{p}_i^n$$ A differential equation can be easily converted into
{ "domain": "gridserver.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290930537122, "lm_q1q2_score": 0.8195310893889575, "lm_q2_score": 0.8438951064805861, "openwebmath_perplexity": 758.8218497616799, "openwebmath_score": 0.6470473408699036, "tags": null, "url": "https://s166534.gridserver.com/last-train-bigr/convert-differential-equation-to-difference-equation-28cf35" }
discrete-signals, signal-analysis, wavelet, transform, signal-synthesis Reconstruction: |I0| |C0 C5 C4 C1 C2 C3| |L0| |I1| |C1 -C4 C5 -C0 C3 -C2| |H0| |I2| |C2 C3 C0 C5 C4 C1| |L1| |I3| |C3 -C2 C1 -C4 C5 -C0| |H1| |I4| = |C4 C1 C2 C3 C0 C5 | |L2| |I5| |C5 -C0 C3 -C2 C1 -C4 | |H2| |I6| | C4 C1 C2 C3 C0 C5 | |L3| |I7| | C5 -C0 C3 -C2 C1 -C4 | |H3| |I8| | C4 C1 C2 C3 C0 C5| |L4| |I9| | C5 -C0 C3 -C2 C1 -C4| |H4| With: C0 = 3.326705529500826159985115891390056300129233992450683597084705e-01 C1 = 8.068915093110925764944936040887134905192973949948236181650920e-01 C2 = 4.598775021184915700951519421476167208081101774314923066433867e-01 C3 = -1.350110200102545886963899066993744805622198452237811919756862e-01 C4 = -8.544127388202666169281916918177331153619763898808662976351748e-02 C5 = 3.522629188570953660274066471551002932775838791743161039893406e-02
{ "domain": "dsp.stackexchange", "id": 3520, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, signal-analysis, wavelet, transform, signal-synthesis", "url": null }
ros //printf ("Advertising cmd_vel message\n"); listBox1->Items->Add("Advertising cmd_vel message\n"); nh.advertise (cmd_vel_pub); //Sleep(1000); timer1->Enabled=true; } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { timer1->Enabled=false; } }; } Originally posted by lukevan on ROS Answers with karma: 16 on 2017-05-02 Post score: 0 FYI, I have already solved the problem. I need to call at least nh.SpinOnce() one time in the initialization thread before enable the timer. Originally posted by lukevan with karma: 16 on 2017-05-03 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 27786, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
python, performance, beginner, python-3.x, tic-tac-toe def print_board(): """Function to print the board""" for i in board: print(i, ':', board[i], ' ', end='') if i % 3 == 0: print() def win_game(marker, player_id): """Function to check for winning combination""" if board[1] == marker and board[2] == marker and board[3] == marker or \ board[4] == marker and board[5] == marker and board[6] == marker or \ board[7] == marker and board[8] == marker and board[9] == marker or \ board[1] == marker and board[4] == marker and board[7] == marker or \ board[2] == marker and board[5] == marker and board[8] == marker or \ board[3] == marker and board[6] == marker and board[9] == marker or \ board[1] == marker and board[5] == marker and board[9] == marker or \ board[3] == marker and board[5] == marker and board[7] == marker:
{ "domain": "codereview.stackexchange", "id": 40068, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, beginner, python-3.x, tic-tac-toe", "url": null }
nd a number of r= dimN(A I) linearly independent eigenvectors associated with . P, secure in the knowledge that these columns will be linearly independent and hence P−1 will exist. Show transcribed image text. If this is the situation, then we actually have two separate cases to examine, depending on whether or not we can find two linearly independent eigenvectors. The eigenvectors corresponding to different eigenvalues are linearly independent meaning, in particular, that in an n-dimensional space the linear transformation A cannot have more than n eigenvectors with different eigenvalues. For n = 3, show that e, x ... number of times a factor (t j) is repeated is the multiplicity of j as a zero of p(t). to choose two linearly independent eigenvectors associated with the eigenvalue λ = −2, such as u 1 = (1,0,3) and u 2 = (1,1,3). Is always less than or equal to the system 0 1 1, if. By considering both of these two vectors will be linearly independent solutions to the eigenvectors and
{ "domain": "strouden.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983847165177859, "lm_q1q2_score": 0.8261698895169413, "lm_q2_score": 0.8397339736884712, "openwebmath_perplexity": 369.4200616105211, "openwebmath_score": 0.9121360778808594, "tags": null, "url": "https://strouden.com/maria-louisa-npysmcz/archive.php?92e7d3=number-of-linearly-independent-eigenvectors-for-repeated-eigenvalues" }
electrostatics, electric-fields is positive, the electric field is uniform and points away from the infinite sheet of charge. The force exerted on a negatively charged particle by the electric field is always in the opposite direction opposite to the electric field itself, so the particle will be attracted toward the sheet of charge. The force on the particle can be calculated using $\vec{F} = \vec{E}q$.
{ "domain": "physics.stackexchange", "id": 94941, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, electric-fields", "url": null }
ros, object-recognition, ros-hydro, object-recognition-kitchen Title: Alternatives to Object Recognition Kitchen I'm having a hard time getting ORK to work. Are there any alternative packages in ROS Hydro for object recognition? I've searched the package list for some time but I can't find anything ... Originally posted by atp on ROS Answers with karma: 529 on 2014-10-27 Post score: 1 In the roboearth project there is an object detector. http://wiki.ros.org/roboearth_stack you can learn your own object from a 3d pointcloud and then recognize them. Originally posted by Mehdi. with karma: 3339 on 2014-10-27 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by atp on 2014-10-27: This seems to be only available in ROS FUERTE ... Comment by Mehdi. on 2014-10-28: You could try to run it on hydro. But I just noticed that the repository link is broken...
{ "domain": "robotics.stackexchange", "id": 19862, "lm_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, object-recognition, ros-hydro, object-recognition-kitchen", "url": null }
quantum-mechanics, optics Incidentally there is a related question at What happens when a photon hits a beamsplitter? and you may be interested to read the answers to that question. The answer is that when the photon reaches your glass slab it will form a superposition of the reflected and transmitted states. So the photon is both reflected and transmitted. If we interact with the system to perform a measurement we will collapse the superposition and we'll find out whether the photon was reflected or transmitted. However there is no way to tell in advance what the result will be. The best we can do is calculate the probabilities that the measurement will find the photon in the two states.
{ "domain": "physics.stackexchange", "id": 31586, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, optics", "url": null }
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. Lady (October 31, 1998) Some Series Converge: The Ruler Series At rst, it doesn't seem that it would ever make any sense to add up an in nite number of things. Infinite Series Introduction Tests for Convergence Power Series Introduction Creating New Power Series from Known Ones Differentiating and Integrating Power Series 10. To use the Geometric Series formula, the function must be able to be put into a specific form, which is often impossible. BC Calculus 10. Express the series in sigma notation and find the interval of convergence. However, many do not understand the underlying concept. Estimation of the remainder. The function g is defined by the power series for all real numbers x for which the series converges. Power series tables. Answer to: 1. Such series can be described informally as infinite
{ "domain": "aquatique-freiburg.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303416461329, "lm_q1q2_score": 0.8226906132284809, "lm_q2_score": 0.831143054132195, "openwebmath_perplexity": 4883.329051840215, "openwebmath_score": 0.2524711489677429, "tags": null, "url": "http://nquz.aquatique-freiburg.de/interval-of-convergence-taylor-series-calculator.html" }
R 0, called the radius of convergence (ROC), such that the series converges whenever |x - c| R Though these indicators are widely exploited by both Tulip Indicators (TI) is a library of functions for technical analysis of financial time series data. Taylor Series . If the terms of a sequence being summed are power functions, then we have a power series, defined by Note that most textbooks start with n = 0 instead of starting at 1, because it makes the exponents and n the same (if we started at 1, then the exponents would be n - 1). WEBCAMP HACK. Solution 1: Replace x (in our original f ( x) before the video) by x 2, and multiply the expression by x . The domain of f, often called the interval of convergence (IOC), is the set of all x-values such that the power series converges. P (x)= n=0anxn, P ( x) = n = 0 a n x n, where the coefficients an a n are real numbers. 2! And after a last manipulation you can get a formal power series of the classical form a n x n. Share. #camphack 11.
{ "domain": "winningmahjong.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9546474181553805, "lm_q1q2_score": 0.8075767673924487, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 526.8473182613332, "openwebmath_score": 0.8019212484359741, "tags": null, "url": "https://winningmahjong.com/funeral/gordon/747681471fa3026e81cc4c4966866c97be8-the-function-f-is-defined-by-the-power-series" }
organic-chemistry, nomenclature Title: Why is this compound named (Z)-but-2-ene-1,1-diyldibenzene and not (Z)-1,1-diphenylbut-2-ene A recent answer of mine involved the synthesis of the following compound: I initially assumed the name of this compound to be (Z)-1,1-diphenylbut-2-ene as the butene is the main chain, with two phenyl groups attached to it. However, the preferred IUPAC name seems to be (Z)-but-2-ene-1,1-diyldibenzene, as verified by ChemDraw. Why is this so? I have not encountered the naming of biphenyls in this manner. What rules apply here to give this compound this name? The first rule you should know is about selecting between a ring and a chain as parent structure. The current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book) reads as follows:
{ "domain": "chemistry.stackexchange", "id": 16291, "lm_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, nomenclature", "url": null }
mycology, microscopy, parasitology Quick googling led me to something like the swift sw380t with a camera for around \$500 + some equipment for slides. Being able record is particularly attractive. Is that reasonable? Is it overkill? Underkill? Should I just grab something used off fb marketplace for a fraction of the cost? Yes, and no as to bacterial and fungal samples. For these you need a conventional light microscope that transmits the light through the sample. These are the common ones when people consider microscopes. You can also get reflected light microscopes (and even hybrid versions for hobbyists), that are needed if you are looking at solid objects such as fleas. These are sometimes called dissection microscopes and generally have lower magnifications (10-200x) only. I don't see why you wouldn't be able to see metal shavings in engine oil, with a conventional microscope, though getting enough light through the sample might be a problem there. Don't get oil on the lenses though and be wary of scratching your
{ "domain": "biology.stackexchange", "id": 12177, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mycology, microscopy, parasitology", "url": null }
algorithms, graphs, trees, huffman-coding First in order to get frequencies from $T$ we can assign the probability of $\frac{1}{2^d}$ to each node where $d$ is the depth of a given node. The root node will have the probability of $1$ which means $100$%. After one traversal of $T$ we could fill the array with the frequencies of the leaves of $T$ (only leaves correspond to the the actual values to be encoded). I'm not sure how to prove that if we apply Huffman algorithm to the frequencies one of the trees will happen to be $T$. It seems like if we build a tree from the frequencies each time such that the new tree is different (if possible) from the previous tree we'll eventually build $T$. Also we know that Huffman tree is always a full tree. The Huffman algorithm is as follows (as described in Algorithm Design by Jon Kleinberg, Eva Tardos): Huffman(S) { if |S|=2 { return tree with root and 2 leaves } else { let y and z be lowest-frequency letters in S S’ = S remove y and z from S’
{ "domain": "cs.stackexchange", "id": 10181, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, trees, huffman-coding", "url": null }
quantum-mechanics, homework-and-exercises, atomic-physics, hydrogen, orbitals $$<\frac 1{r^3}> = 4 \pi^2 C^2\int_0^\infty \frac 1r e^{-r/2a} dr $$ which does not converge at $0$. Any help would be appreciated. If your wave function is $\Psi = Cre^{-r/2a}$, then you mustn't forget the additional $r^2$ you get from the Jacobi determinant (actually $r^2\sin\theta$, but the $\sin\theta$ is accounted for with the $4\pi$) when changing coordinates: $$ \left<\frac{1}{r^3}\right> = 4\pi C^2\int_0^\infty\mathrm{d}r \;r^2\cdot\frac{1}{r^3}\cdot(re^{-r/2a})^2 = 4\pi C^2\int_0^\infty\mathrm{d}r \;r\cdot e^{-r/a} = 4\pi C^2a^2 $$
{ "domain": "physics.stackexchange", "id": 38217, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, atomic-physics, hydrogen, orbitals", "url": null }
python, python-3.x, web-scraping, beautifulsoup, markdown def print_pretty(soup): print(soup.prettify()) def main(): soup = get_soup(URL) print_hats_as_gfm_checkboxes(soup) # print_pretty(soup) if __name__ == '__main__': main() This produces a list of all the hats in the right format to be suitable for copy-pasting into a Gist. Anything to improve here? Don't do this: #!/usr/bin/env python Some people make the poor excuse that PEP 394 recommends that python continue to refer to python2 for the time being but this doesn't even apply to you since yours only supports Python 3! Use this instead: #!/usr/bin/env python3
{ "domain": "codereview.stackexchange", "id": 11350, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, web-scraping, beautifulsoup, markdown", "url": null }
inorganic-chemistry, coordination-compounds, bond both of the electrons come from one of the atoms or from a molecule. This type of bond is known variously as a coordination, a dative covalent or a donor-acceptor bond. It was recognized early on that the formality of dative covalency in coordination compounds presents some difficulties. Many inorganic compounds are conveniently thought of as ionic salts in which there is an essentially complete charge separation between cationic and anionic species. Compounds of the group 1 and group 2 metals tend to be readily categorized as ionic. Dissolution of a salt of a group 1 or a group 2 metal results in the formation of solutions containing solvated cations and anions - only in concentrated solutions are there significant cation-anion interactions beyond simple ion-pairing. However, the ionic model does not appear to be suitable for the description of the properties of many transition-metal compounds. For example, the compound $\ce{K4[Fe(CN)6]}$ dissolves in water to give
{ "domain": "chemistry.stackexchange", "id": 1131, "lm_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, coordination-compounds, bond", "url": null }
python Title: Rounding number to 10 I’m a complete beginner. I was practicing from coding bat and the question was to create a function that will round 3 integers to the nearest 10 and then find their summation. I thought of a way to do it and it’s given in the picture below. Please help. def round10(num): return # This will return the rounded number def sum(a,b,c) return round10(a) + round10(b) + round10(c) There is a potential here to mangle type conversions I noticed that you are trying to manipulate integers in ways only strings and other iterables can: both len(num) and num[0]/num[-1] will give you a TypeError. In order to prevent that from happening, you would need to first convert the number to a string and then to a list: def round10(num): number = list(str(num))
{ "domain": "codereview.stackexchange", "id": 37893, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
cryptography, cq-states +&\frac14\sum\limits_{y\in\mathcal{C}_1}\mathrm{Pr}[\mathsf{HE.Enc}_{pk}(1)=y]|y,y\rangle\langle y,y|\otimes\mathsf{X}\mathsf{Z}\rho^{\mathcal{M}}\mathsf{Z}\mathsf{X}\\ \end{array}$$
{ "domain": "quantumcomputing.stackexchange", "id": 5104, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cryptography, cq-states", "url": null }
quantum-mechanics, electromagnetism, atoms, hydrogen, quantum-measurements The different interpretations of quantum mechanics all make exactly the same predictions about what we will observe in any given situation, and so are experimentally indistinguishable. It is therefore not a scientific question. The Everett interpretation has simpler rules (no mysterious collapse triggered by who knows what, or faster-than-light backwards-in-time paradoxes), but a far more complicated state (billions of unobservable alternate realities). Which picture you prefer is up to you. The idea of interactions and measurements being the same comes from the Everett interpretation and its close relatives. Collapse interpretations treat them as entirely different sorts of events, although they don't agree among themselves on what the distinction is.
{ "domain": "physics.stackexchange", "id": 92821, "lm_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, atoms, hydrogen, quantum-measurements", "url": null }
electromagnetism, electric-circuits, electrons So, using this formula, we could determine the approximate lifetime of a battery in a circuit with the average power consumption $P$ as $t=\frac {E.E} P$. In practice, batteries are commonly rated not by the amount of energy (Watt-hours), but by the amount of charge (Ampere-hours or Ah) they can deliver. So, for calculating battery lifetime, we would need to know its average current consumption, rather than its average power consumption, although, assuming some average voltage, one could be derived from the other. The capacity of a battery is specified for certain conditions (temperature, discharge current level, etc.) and, as the conditions change, the capacity changes as well. So, in many cases, lifetime estimates of a battery are very crude.
{ "domain": "physics.stackexchange", "id": 52196, "lm_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, electric-circuits, electrons", "url": null }
ros, transforms, moveit, ros-kinetic Originally posted by PeteBlackerThe3rd with karma: 9529 on 2019-03-10 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by sisko on 2019-03-10: Hmmm!!! I feel like such a DOH-nut! Comment by PeteBlackerThe3rd on 2019-03-10: It happens to us all at times!
{ "domain": "robotics.stackexchange", "id": 32619, "lm_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, transforms, moveit, ros-kinetic", "url": null }
c#, generics When iterating over the list, we simply invoke the mapping (on the element t), which returns the value of its intended index. All we have to do then is check whether the value matches the index that was currently given as a parameter, which is easily done by calling .Equals(). Example usages: //Enum as index var myCollection = new MyCollection<MyClass, MyEnum>(o => o.MyEnumProperty); var element = myCollection[MyEnum.One]; //Int as index var myCollection = new MyCollection<MyClass, int>(o => o.MyIntProperty); var element = myCollection[12345]; //String as index var myCollection = new MyCollection<MyClass, String>(o => o.MyStringProperty); var element = myCollection["Hello"]; Tangential comments
{ "domain": "codereview.stackexchange", "id": 28243, "lm_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#, generics", "url": null }
biochemistry, molecular-biology, cell-biology, food At the risk of channeling people into a yes or no answer, could someone clarify for me if the following statement is true maybe with a peer-reviewed source, which I've had no luck finding: TLDR Bananas go brown quickly in the fridge because cell lysis, caused by ice crystal formation at cold temperatures in the fridge, releases Polyphenol oxidase (PPO) into the surrounding area which freely causes more browning.
{ "domain": "biology.stackexchange", "id": 10011, "lm_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, molecular-biology, cell-biology, food", "url": null }
proteins, food, digestive-system, amino-acids, digestion (The question Can proteins/peptides pass through the intestine? and it's answers are related, and provide some context and relevant parts, but is not a duplicate.) Short answer: Indeed the proteins in our body are based on amino acids from external food sources. BUT, proteins up-taken from food are ALWAYS disassembled first into amino acids, through specialized enzymes, proteases, (for instance Pepsin in the stomach's gastric juices and Tripsin in the pancreatic juices), during digestion, in the alimentary canal, (gut). This enables the body's liver to build the proteins most needed by the organism itself, through the processes of transamination, that allows conversion betwixt amino acids, and deamination, that removes N2 from the amino acid, (let's say the "amino" part is removed, and then expelled as urea), to excrete amino acids in excess. In addition this breaking down of external proteins is necessary, since they can act as labels for pathogens, and external organisms in general,
{ "domain": "biology.stackexchange", "id": 10277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "proteins, food, digestive-system, amino-acids, digestion", "url": null }
python, object-oriented, python-2.x, enum After reviewing the SO post here on recommendations for non-enum34 implementations of enums in Python 2.7, I also would add: Clean, readable definition of enum values. To note, every form of dynamic namespace construction I've tried, in efforts to accomplish #1, has broken #2. I'm pretty sure at this point they're mutually exclusive. In any event, my current solution goes as follows, defining an enum superclass with a metaclassed type with an iterator that returns all members with string content identical to the respective member names: class SuperEnum(object): class __metaclass__(type): def __iter__(self): for item in self.__dict__: if item == self.__dict__[item]: yield item Each enum is then subclassed from this SuperEnum, e.g.: class myEnum(SuperEnum): this = 'this' that = 'that' other = 'other'
{ "domain": "codereview.stackexchange", "id": 16587, "lm_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, object-oriented, python-2.x, enum", "url": null }
bioinformatics, history, computational-model Title: What was the first piece of work in computational biology? What was the first piece of work in computational biology? I'm ideally looking for a paper. I am not interested in works that involve data management or data analysis but work that model biological processes through numerical simulations or numerical approximations of analytical results. Another nomination, if you include infectious disease epidemiology as part of biology and hence computational simulations of epidemics as part of computational biology: Measles periodicity and Community Size, M. S. Bartlett, J. Roy. Stat Soc. A, 120(1), 1957. The computations were run on the Manchester computer. Possibly the most entertaining part of the paper is the discussion afterwards from one of the computing assistants:
{ "domain": "biology.stackexchange", "id": 5882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bioinformatics, history, computational-model", "url": null }
fluid-dynamics, ideal-gas, weight, volume, inert-gases Title: Converting Gas volume to Liquid Volume For a test setup, I need to set CO2 flowrate as 130 L/h but I do not have a flow measuring device to set it. So I made one device as mentioned below. Once I set the flowrate, I will remove containers/beaker and use the capillary tube to my test setup. (Ignore weight of beaker). My query is, I was able to set 130 Liters/h equivalent flow rate using flow adjuster, but as my beaker gradient is having measure of liquid volume, is my device measuring a wrong flow rate? Use an inverted measuring cylinder instead of a graduated beaker: it's more precise:
{ "domain": "physics.stackexchange", "id": 60863, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, ideal-gas, weight, volume, inert-gases", "url": null }
python, python-2.x, file-system, geospatial, arcpy POT_FOR = os.path.join(str(Temp_1m),str(CoName) + "_potFOR") RLTCP = os.path.join(str(Temp_1m) + str(CoName) + "_RLTCP") RTmask = os.path.join(str(Temp_1m) + str(CoName) + "_RTmask") RURmask = os.path.join(str(Temp_1m) + str(CoName) + "_RURmask") TGMask = os.path.join(str(Temp_1m) + str(CoName) + "_TGmask") TURFparcels = os.path.join(str(Temp_1m),str(CoName) + "_TURF_parcels") TURFtemp = os.path.join(str(Temp_1m) + str(CoName) + "_TURFtemp") TREES = os.path.join(str(Temp_1m) + str(CoName) + "_MOTrees") URBmask = os.path.join(str(Temp_1m) + str(CoName) + "_URBmask") WAT_FOR = os.path.join(str(Temp_1m),str(CoName) + "_watFOR")
{ "domain": "codereview.stackexchange", "id": 23333, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-2.x, file-system, geospatial, arcpy", "url": null }
floor(10^146/293)-10*floor(10^145/293) 3 As to why, well, $p=293$ is prime, and $p-1=292=2^2\cdot73$, and any integer $a$ which is relatively prime to $p$ will have order $d$ dividing $p-1$. So the smallest positive power $d$ of $a=10$ so that $a^d\equiv1\pmod p$ must be $2,4,73,2\cdot73=146$ or, if none of these, then $4\cdot73=292$. Now $d=2$ and $d=4$ can easily be ruled out since $100,1000\not\equiv1\pmod{292}$. For $d=73$, note that $73=(10010001)_2=2^6+2^3+2^0$, so that we can calculate $10^{73}$ modulo $293$ (and its square if necessary) as follows: $$10^2=100$$ $$10^4=(100)^2=10000\equiv38\pmod{293}$$ $$10^8\equiv(38)^2=1444\equiv272\equiv-21\pmod{293}$$ $$10^9\equiv10\cdot(-21)=-210\equiv83\pmod{293}$$ $$10^{18}\equiv(83)^2=6889\equiv150\pmod{293}$$ $$10^{36}\equiv(150)^2=22500\equiv232\equiv-61\pmod{293}$$ $$10^{72}\equiv(-61)^2=3721\equiv205\equiv-88\pmod{293}$$ $$10^{73}\equiv10\cdot(-88)=-880\equiv292\equiv-1\pmod{293}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429634078179, "lm_q1q2_score": 0.843480232065366, "lm_q2_score": 0.8577681068080749, "openwebmath_perplexity": 298.25198836367633, "openwebmath_score": 0.930730402469635, "tags": null, "url": "http://math.stackexchange.com/questions/108124/calculate-the-146th-digit-after-the-decimal-point-of-frac1293" }
species-identification, entomology Title: Identification of moth in Pandemis heparana trap While monitoring Pandemis heparana in an apple orchard in South Tyrol (middle of August), I frequently observed huge moths accumulating within the trap. The trap itself is working with pheromones for Pandemis heparana. The moth is 4 cm long and at least 1.5 cm in diameter. It is quite solid and has upper wings which are brownish and lower wings which are bright orange with a distinct black part at the end of the wing.
{ "domain": "biology.stackexchange", "id": 11555, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "species-identification, entomology", "url": null }
perl, csv, bioinformatics, join The substitution s/.*"(.*?)".*/$1/s is iffy. If you want to match a quoted string, "[^"]*" is simpler for the regex engine to handle than ".*?". Of course, it also doesn't support escapes. If you want to replace the whole string by the thing in the quotes, just use a normal match rather than a substitution, e.g: if ($gene_name =~ /["]([^"]*)["]/) { $gene_name = $1; } which is more straightforward. Creating a time-based filename is fragile and unintuitive for a user. Instead, let the user specify the output file name manually. Alternatively, generate a more unique filename (e.g. by using the process ID $$ in the filename). Another approach, which I have taken below, is to print to standard output, and let the user write the results to a file using shell redirection. The Information subroutine isn't used.
{ "domain": "codereview.stackexchange", "id": 7264, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "perl, csv, bioinformatics, join", "url": null }
machine-learning-model, data-science-model, cross-validation, hyperparameter-tuning Title: Flow of machine learning model including code I'm towards the completion of my first data science project that will go into my GitHub portfolio. I'll be happy for some clarification regarding the machine learning models section: I got a little confused with the steps: evaluation model, baseline model, cross-validation, fit-predict, when to use (X, y), and when to split the data with train_test_split and use (X_train, y_train). Dataset from Kaggle - Stroke Prediction: https://www.kaggle.com/datasets/fedesoriano/stroke-prediction-dataset?datasetId=1120859&sortBy=voteCount&searchQuery=models The dataset contains 5110 observations with 10 attributes and a target variable: 'stroke'. The dataset is unbalanced, with 5% positive for stroke. I tried to follow different projects, however, because each one has its own way, I got lost with what is the correct way and what is optional. This is what I have so far: Baseline model: def load_data ():
{ "domain": "datascience.stackexchange", "id": 11673, "lm_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-model, data-science-model, cross-validation, hyperparameter-tuning", "url": null }
javascript, jquery, html, datetime background-color: #FFF; cursor: default; } div.widget div.body tr.head td > * { color: #3498DB; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> <div class="widget"> <div class="head"> <p class="day"></p> <h1 class="date"></h1> <p class="month"></p> <i class="trg trg-prev fa fa-fw fa-caret-left"></i> <i class="trg trg-next fa fa-fw fa-caret-right"></i> </div> <div class="body"> <table> <tbody> <tr class="head"> <td> <p>M</p> </td> <td> <p>T</p> </td> <td> <p>W</p> </td> <td> <p>T</p> </td> <td> <p>F</p> </td> <td> <p>S</p> </td> <td> <p>S</p> </td> </tr>
{ "domain": "codereview.stackexchange", "id": 15270, "lm_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, html, datetime", "url": null }
crystal-structure, molecules, molecular-structure, symmetry Title: Relation between molecule symmetry and crystal symmetry How much is crystal symmetry dependent on molecule symmetry? Can one make any kind of inferences on the symmetry of the molecule looking at the symmetry of its crystal or the other way around? There is only loose connection. If you have molecule that shows C3 symmetry like Ph3P->BCl3 there is a good chance that crystal will have either hexagonal or trigonal cell. On the other side I've seen structure of C2 symmetrical molecule (small metalo-organic) where three molecules built up a helix which led to P3(1) space group. The only "hard" rule is, as Ivan wrote, is that if your compound is chiral and you are working during crystallization with pure enantiomers (not racemic mixtures) then the space group of crystal must also be chiral.
{ "domain": "chemistry.stackexchange", "id": 7816, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "crystal-structure, molecules, molecular-structure, symmetry", "url": null }
general-relativity, newtonian-gravity, free-fall $$ r_s = \frac{2GM}{c^2} $$ and if we feed in the mass and radius of the Earth we get: $$ \frac{r_s}{r_e} = 1.39 \times 10^{-9} $$ So GR predicts the velocity when the object reaches the Earth's surface will be smaller than the Newtonian expression by a factor of $0.9999999986$. The more eagle eyed amongst you will have spotted somethng odd - equation (2) tells us that when $r = r_s$ the factor of $1 - r_s/r$ goes to zero, so the velocity is zero at the event horizon. This is the reason for the notorious claim that nothing can fall into a black hole, because all falling objects tend asymptotically to a velocity of zero at the horizon.
{ "domain": "physics.stackexchange", "id": 20370, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, newtonian-gravity, free-fall", "url": null }
java, object-oriented, comparative-review pkString = pk.getLongValueAsString(); } @Override public String toString() { return pkString; } } public List<Information> getInformation(final OrganizationEnum organizationEnum) { final OrganizationPrimaryKeyString organization = new OrganizationPrimaryKeyString(organizationEnum); try { final SessionContext ctx = createAndSetupLocalSessionContext(organization); (...) return (...); } catch (final FactoryException e) { throw new SystemException(e.getMessage(), e); } finally { closeLocalSessionContext(); } } private SessionContext createAndSetupLocalSessionContext(final OrganizationPrimaryKeyString organization) { (...) sessionContext.setAttribute("organization", salesOrganization.toString()); return sessionContext; } }
{ "domain": "codereview.stackexchange", "id": 10816, "lm_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, object-oriented, comparative-review", "url": null }
coefficient is a construction of expansion! A family of positive integers that occur as coefficients in the probability tree there has been an additional scaling added... This same array could be expressed using the factorial symbol, as shown in the of. Known from Blaise Pascal 's triangle can be calculated in the binomial coefficient is indexed by pair. The n-th row of … History a few properties of binomial distributions and redundant! B le 4.1.1 introduce and explain why the filter designed for suppressing multiplicative leads. Actually a generalized formula for binomial coefficients are used binomial coefficient explained the study of binomial coefficients and identically Bernoulli! Another way of writing -- and this is actually a generalized formula for binomial coefficients are to! Happens when we multiply a binomial by itself... many times nC n, 2... In generalizing this is to understand the number of correct answers X is a construction the! Plus puzzles, games, quizzes,
{ "domain": "hlccc.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9603611631680358, "lm_q1q2_score": 0.8104440785106697, "lm_q2_score": 0.8438950986284991, "openwebmath_perplexity": 710.6547183819509, "openwebmath_score": 0.781328558921814, "tags": null, "url": "https://journey.hlccc.org/book-in-iffhkb/archive.php?page=binomial-coefficient-explained-84acc7" }
quantum-gate, quantum-state, entanglement, hadamard, state-preparation Title: Is the CNOT in the standard three-qubit circuit for the GHZ state necessary? This is a very basic question about the GHZ state. I know the standard construction: A Hadamard on one qubit, and then CNOT gates with targets on all the other ones. However, why can't I just have $n$ Hadamard gates for $n$ qubits? Why would this not be equivalent--what am I missing? If you initialize three qubits to $|0\rangle$, apply a Hadamard gate to each, then measure each in the computational basis, the result will be an independent coin flip for each bit: that is, any of 000, 001, 010, ..., 111, each with probability 1/8. If you measure all three bits of the GHZ state in the computational basis, you'll get either 000 or 111, each with probability 1/2.
{ "domain": "quantumcomputing.stackexchange", "id": 3148, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-gate, quantum-state, entanglement, hadamard, state-preparation", "url": null }
c#, interface if (accumulator.Count == 1) { accumulator.Count = 2; // or, Count++ if (accumulator.Dominates(accumulator.Alpha, element)) { accumulator.Beta = element; accumulator.Omega = element; accumulator.OmegaIndex = 1; // or, Count return accumulator; } accumulator.Beta = accumulator.Alpha; accumulator.Alpha = element; accumulator.AlphaIndex = 1; return accumulator; }
{ "domain": "codereview.stackexchange", "id": 14165, "lm_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#, interface", "url": null }
gazebo, joint, xacro, world, robot Original comments Comment by BennyRe on 2014-04-24: Has the cylindrical post a mass? Comment by b3l33 on 2014-04-25: Yes. It has a mass of 50. I have since discovered that the manipulator exhibits the same behaviour if fixed directly to the ground as well. Please see the following youtube video for reference: http://youtu.be/RVYIK4C_mgk Any suggestions on what I may do to stabilize the robot's behaviour? Thank you! Hi b3l33 The gains of the controller and the inertia of the model have default values. This cause the the arm has a lot of inertia and the controller is very slow and underdamped. The origin of the oscilations is the gravity, acting as a perturbation on the system. Other efect is a very large position error. When the arm stops, the hand is very down the goal state. You can see it in rviz. I want to develope a best modell next week, but now you can use the following; (This values are tested for hydro-dev branch of ros-industrial/universal_robot package.)
{ "domain": "robotics.stackexchange", "id": 17773, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, joint, xacro, world, robot", "url": null }
on github: https://github.com/rwinston/kdb-rmathlib. Note that loading rmath.q loads the rmath dll, which in turn loads the rmathlib dll, so the rmathlib dll should be available on the dynamic library load path. [Check out Part 2 of this series] Exporting Data From R to KDB Here is the beginnings of a simple routine to convert R data frames to Q format (in this case a dictionary). It uses the S3 dispatch mechanism to handle the conversion of different data types. Extremely basic (I havent even bothered to put in proper file output – just capturing the output of cat) but very quick to knock up. The code is mainly a top-level function called to_dict: to_dict <- function(x) { cat(substitute(x),":", sep="") nms <- names(x) for (n in nms) { cat("",n,sep="") } cat("!(",sep="") r <- rep(c(";",")"),times=c(length(nms)-1,1)) for (i in 1:length(nms)) { cat(qformat(x[[nms[i]]]),r[i],sep="") } } Where qformat is a generic S3 function: qformat <- function(x) { UseMethod("qformat") } qformat.default
{ "domain": "theresearchkitchen.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308786041316, "lm_q1q2_score": 0.8124304614636026, "lm_q2_score": 0.8221891239865619, "openwebmath_perplexity": 2287.870760814901, "openwebmath_score": 0.6073945760726929, "tags": null, "url": "http://www.theresearchkitchen.com/blog" }
php Title: Resolving directory traversal I keep seeing /subsite/../global/css/file.css when I look at my website's source code, and today I decided that I want to get rid of the unnecessary traversal in the path itself, so it becomes /global/css/file.css. I made myself a function which I now use for all paths. Here is the base of my function that accomplishes this: function djpth($pth){ // Split path at slashes (always receives path with forward slash) $pth = explode('/',$pth); // Iterate through the new array foreach ($pth as $i => $part) // If we find a traversal mark if ($part == '..') // We get rid of the folder name before the mark and the mark itself array_splice($pth,$i-1,2); // We join the array back together $pth = implode('/',$pth); // Then we return the resolved path return $pth; }
{ "domain": "codereview.stackexchange", "id": 6452, "lm_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", "url": null }
ruby, jekyll, liquid Title: Fluid tag for displaying GitHub Gists with noscript tags in a Jekyll post A while back I wrote a Fluid tag for Jekyll that inserts the contents of a GitHub Gist into the content of the page in <noscript> tags for RSS readers. I've noticed a couple things I'm not happy with since posting it, but I am interested in the critique it will generate here on Stack Exchange! (Obviously, some of the internals regarding methods required to make Liquid tags work (such as the parameters to initialize and having a render method) aren't negotiable, but you get the idea.) require 'digest/md5' require 'net/https' require 'uri' module Jekyll class GistTag < Liquid::Tag def initialize(tag_name, text, token) super @text = text @cache = true @cache_folder = File.expand_path "../_gist_cache", File.dirname(__FILE__) end def render(context) return "" unless @text =~ /([\d]*) (.*)/
{ "domain": "codereview.stackexchange", "id": 150, "lm_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, jekyll, liquid", "url": null }
where fs = fibonacci n loop [] x ds | x == 0 = ds | otherwise = error "as_fibonacci_sum: could not compute sum!" loop fs@(f : rest) x ds | (x == f) && (x < n) = (f : ds) | f < x = loop rest (x - f) (f : ds) | otherwise = loop rest x ds
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9496693688269984, "lm_q1q2_score": 0.8109347798330716, "lm_q2_score": 0.853912747375134, "openwebmath_perplexity": 1685.9078279993373, "openwebmath_score": 0.7801217436790466, "tags": null, "url": "https://math.stackexchange.com/questions/2431827/summation-involving-floor-of-irrational-numbers/2447422" }
java, beginner, multithreading final Paypal paypal = this.paypal; final Box box = this.box; try { synchronized(paypal) { // spin until we can make progress while(paypal.getStatus() < 100) { paypal.wait(); } synchronized(box) { while(box.isBoxStatus()) { box.wait(); } depositBox(); withdrawPaypal(100); } } } catch(InterruptedException e) { Thread.currentThread().interrupt(); } } }
{ "domain": "codereview.stackexchange", "id": 17659, "lm_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, multithreading", "url": null }
Furthermore, we know that $f$ and $g$ are monotone functions. This means that each function must be continuous everywhere except possibly on a countable set. For a proof, see here, for example. Let $D_f$ and $D_g$ respectively denote the sets where $f$ and $g$ are discontinuous. These sets are countable. Note that $D_f \cup D_g$ is still countable (the union of two countable sets is countable), and $f$ and $g$ are both continuous (hence equal) everywhere in the complement of $D_f \cup D_g$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534316905262, "lm_q1q2_score": 0.8302531042971706, "lm_q2_score": 0.8459424334245617, "openwebmath_perplexity": 136.50943893090593, "openwebmath_score": 0.9717347621917725, "tags": null, "url": "https://math.stackexchange.com/questions/2551602/two-monotone-functions-which-equal-on-rational-numbers?noredirect=1" }
sound-isolation Title: What is the best thin/light material to kill/absorb sound? Sorbothane? I am currently building a box filled with electronics and I now look to isolate the sound a bit with the lightest and best material out there. What I am looking for is a thin, lightweight and very soundproof material. I came across a material called Sortbothane and it seems like a very good fit. Sorbothane Acoustic & Vibration Damping Film 40 Duro 0.04" of Sorbothane Will Absorb up to 4 dB That number is pretty impressive I must say and the material seems to be reasonable light and thin as well. So to my question, do you think Sortobothane is the way to go or is there any other materials out there with the same/better soundabsorbing? I am also thinking to combine a few materials to make it very solid. For instance I am planning to use a small layer of silicone as well. Isolate and absorb are two different things:
{ "domain": "engineering.stackexchange", "id": 1427, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sound-isolation", "url": null }
sql, haskell, api, rest, url-routing types.hs {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Types where import GHC.Generics import Data.Aeson (parseJSON, FromJSON, ToJSON, encode, decode, (.:), (.:?), Value(..)) import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.ToRow import Database.PostgreSQL.Simple.FromRow import Database.PostgreSQL.Simple.ToField import Data.Time.Clock data User = User { userId :: Maybe Int, firstName :: String, lastName :: String, team :: Int } deriving (Show, Generic) instance FromJSON User where parseJSON (Object v) = User <$> v .:? "userId" <*> v .: "firstName" <*> v .: "lastName" <*> v .: "team" instance ToJSON User instance FromRow User where fromRow = User <$> field <*> field <*> field <*> field instance ToRow User where toRow u = [toField (firstName u), toField (lastName u), toField (team u)] data Team = Team { teamId :: Maybe Int, name :: String } deriving (Show, Generic)
{ "domain": "codereview.stackexchange", "id": 23873, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, haskell, api, rest, url-routing", "url": null }
thermodynamics, forces, water, estimation, freezing Absolutely; all passive materials can be compressed. The bulk modulus, a material property with units of pressure, couples the applied pressure to a relative reduction in volume. The bulk modulus for ice at 0°C is around 8 GPa, which means that about 8 MPa or 80 bar pressure is required for a -0.1% volumetric change. What happens when water should expand, but there is no room for it to do so, and the container is too strong to be deformed? Here, a phase diagram for water is useful. The discussion in Powell-Palm et al.'s "Freezing water at constant volume and under confinement" includes a volume–temperature phase diagram:
{ "domain": "physics.stackexchange", "id": 81077, "lm_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, forces, water, estimation, freezing", "url": null }
javascript, beginner, html, css, calculator $(document).ready(function(){ allButtons.on("click", function(){ var content = $(this).html(); // special cases switch (content) { case "=": computeAnswer(); break; case "AC": pressed = "0"; break; case "CE": removeLastPressed(); break; case "Ans": if (lastPressedOperation()) { pressed += ans; } if (pressed == "0") { // if refreshed by pressing AC pressed = ans; } break; default: var val = $(this).attr("value"); console.log("You pressed " + val); if (val == null) { // if its an operation if (!lastPressedOperation()) { // if allowed to press operation again pressed += content; }
{ "domain": "codereview.stackexchange", "id": 20228, "lm_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, beginner, html, css, calculator", "url": null }
quantum-state, quantum-operation, fidelity Title: How to calculate the average fidelity of an amplitude damping channel An answer to this question shows how to calculate the average fidelity of a depolarizing channel. How would one go about calculating this for an amplitude dampening channel? I tried working out the math myself but had no luck. The tricks used in the previous answer can't be applied in this new scenario it seems... An elementary method is to simply carry out the integration $$ \begin{align} \overline{F} &= \int\langle\psi|\mathcal{N_\gamma}(|\psi\rangle\langle\psi|)|\psi\rangle d\psi\\ &=\int\langle\psi|K_0|\psi\rangle\langle\psi|K_0^\dagger|\psi\rangle + \langle\psi|K_1|\psi\rangle\langle\psi|K_1^\dagger|\psi\rangle d\psi\\ & =\frac{1}{4\pi}\int_0^\pi\int_0^{2\pi}\left|\begin{pmatrix}\cos\frac{\theta}{2}&e^{-i\phi}\sin\frac{\theta}{2}\end{pmatrix}\begin{pmatrix}1 & 0 \\0 & \sqrt{1 - \gamma}\end{pmatrix}\begin{pmatrix}\cos\frac{\theta}{2}\\e^{i\phi}\sin\frac{\theta}{2}\end{pmatrix}\right|^2\sin\theta \\
{ "domain": "quantumcomputing.stackexchange", "id": 2436, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-state, quantum-operation, fidelity", "url": null }
ros-melodic Originally posted by gvdhoorn with karma: 86574 on 2021-10-14 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by huytyskland on 2021-10-15: Thank you. That helps me to solve the issue.
{ "domain": "robotics.stackexchange", "id": 37018, "lm_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-melodic", "url": null }
java, error-handling It shouldn't be possible to add multiple finally blocks. I'm not sure to what extent I should stop the user from doing stupid things. I could make the object immutable, but again, I'm not sure if that's necessary. Since this is basically just exercise code, I'd love to anything at all that could be improved here. This is the first Java I've really written in a few years, so I'm sure there's lots that can be improved. import java.util.HashMap; import java.util.Map; import java.util.function.Function; import java.util.function.Supplier; public class Try<T> { private Supplier<T> tryExpr; private Map<Class, Function<Exception, T>> handlers = new HashMap<>(); private Runnable finallyExpr; public Try(Supplier<T> tryExpr) { this.tryExpr = tryExpr; }
{ "domain": "codereview.stackexchange", "id": 33635, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, error-handling", "url": null }
newtonian-mechanics, forces, momentum, acceleration, velocity My Work: I have looked at this question - How does $F = \frac{ \Delta (mv)}{ \Delta t}$ equal $( m \frac { \Delta v}{ \Delta t} ) + ( v \frac { \Delta m}{ \Delta t} )$?, but it's a totally different equation. My Final Question: Can someone please clear my doubts about this equation and help me understand how does: $$\frac{\Delta(mv)}{t} = m \frac{\Delta v}{\Delta t}$$ Thanks a lot ! 1) Yes indeed, the absence of a $\Delta$ in the second expression is just a typo. 2) The last expression is derived assuming that mass is a constant. If it helps, just set the mass equal to 4, or something. If we want to know how the quantity $ 4v $ changes, we really only need to know how the quantity $v$ changes. Suppose $v$ changes from $v_1$ to $v_2$. Then $$ \Delta v = v_2 - v_1 \,,$$ and what will $\Delta(4v)$ be? Why it will be $$ \Delta(4v) = 4v_2 - 4v_1 = 4(v_2 - v_1) = 4\Delta v \,.$$
{ "domain": "physics.stackexchange", "id": 74539, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, momentum, acceleration, velocity", "url": null }
of discrete math guided textbook solutions, and expert discrete math answers when you need them. Chegg's discrete math experts can provide answers and solutions to virtually any discrete math problem, often in as little as 2 hours. Learn more. 8 pages are included: Title page, 2 page foldable, 2 page practice sheet, 3 page answer sheets The Discrete and Continuous Foldable is a two sided foldable that can be completed by the student. Monday, November 19, 2012 Discrete and Continuous Data A random variable is a variable that takes on one of multiple different values, each occurring with some probability. For instance, a single roll of a standard die can be modeled by the Mar 18, 2020 · Control Charts: A discrete distribution is one in which the data can only take on certain values, for example integers. Unlike a continuous distribution, which has an infinite Prim's algorithm, discovered in 1930 by mathematicians, Vojtech Jarnik and Robert C. Attribute data is always binary and unuseable
{ "domain": "marcoiacobini.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347905312774, "lm_q1q2_score": 0.8055767255643665, "lm_q2_score": 0.8267117855317474, "openwebmath_perplexity": 763.2799253174638, "openwebmath_score": 0.463134765625, "tags": null, "url": "http://www.marcoiacobini.com/poyar/discrete-data-definition-math.html" }
References. Sometimes, you will see expressions like $\frac{3}{\sqrt{2}+3}$ where the denominator is composed of … This image is not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. Because of the expression y + √(x 2 +y 2) in the denominator, multiply numerator and denominator by its conjugate y - √(x 2 + y 2) to obtain Questions With Answers Rationalize the denominators of the following expressions and simplify if possible. Printable Worksheets @ www.mathworksheets4kids.com Name: Rationalize the Denominator 1) 3) 5) 7) 9) 2) 4) 6) 8) 10) 11! To rationalize a denominator, start by multiplying the numerator and denominator by the radical in the denominator. Fixing it (by making the denominator rational) Then, simplify your answer as needed. This lesson demonstrates how to apply the properties of square roots to rationalize the denominator of fractions that contain radicals. For instance, we could easily agree
{ "domain": "locksmith-milton.ca", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.968381236381426, "lm_q1q2_score": 0.832482242109358, "lm_q2_score": 0.8596637469145053, "openwebmath_perplexity": 914.316174587637, "openwebmath_score": 0.8417977690696716, "tags": null, "url": "http://locksmith-milton.ca/hydroxy-bhcuvy/archive.php?id=rationalizing-the-denominator-8f9c31" }
microbiology, virus, virology, life, locomotion In summary my question is, how are viruses propelled? Do they move themselves, or are they moved by external forces? All of your reasoning is correct - viruses are not motile (i.e. not self-propelled). I don't understand why you think this would cause a difficulty in the case of bacteria. Edit in response to comment @Remi.b Some cursory research on estimating probabilities of collisions between particles engaged in random walks has revealed some very challenging maths. So I decided to simply look at some data. Remarkably there is a fairly recent paper describing investigations of the kinetics of bacteriophage adsorption.
{ "domain": "biology.stackexchange", "id": 11689, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "microbiology, virus, virology, life, locomotion", "url": null }
Now, if the square root of something is 3, then that something must be 9, so it immediately follows that (4) $x+8 = 9$ (5) $x = 1$ (we subtract 8 from both sides) ## Squaring Both Sides In my transition from (3) to (4), I used a bit of reasoning. Some conversational common sense told me that “if the square root of something is 3, then that something must be 9”. But that logic is usually just reduced to an algebraic procedure: “squaring both sides”. If we square both sides of equation (3), we get equation (4). On the one hand, this seems like a natural move. Since the meaning of $\sqrt{a}$ is “the (positive) quantity which when squared is $a$“, the expression $\sqrt{a}$ is practically begging us to square it. Only then can we recover what lies inside. A quantity “which when squared is $a$” is like a genie “which when summoned will grant three wishes”. In both cases you know exactly what to do next.
{ "domain": "mrchasemath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9932024680472162, "lm_q1q2_score": 0.800155871481975, "lm_q2_score": 0.805632181981183, "openwebmath_perplexity": 488.61011004843976, "openwebmath_score": 0.7143651843070984, "tags": null, "url": "https://mrchasemath.com/category/philosophy-of-math/" }
python Move the code after your __main__ check into a function, since it's still in global scope. PEP8 firstReq should be first_req, and the same for new_req. Dict comprehension I would rearrange your filtered comprehension to be only a dict, and to use dict.update. In other words, filtered = {r: self._requests.get(r) for r in requests}
{ "domain": "codereview.stackexchange", "id": 39729, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
ylab="sqrt(n-1) times expct dist nn", main="sqrt(n-1) times Expected distance of nearest neighbour", ylim = c(0.5,0.56)) par(mfrow=c(1,1)) exn1 <- c(1:9, 19, 49, 99, 199, 499, 999) tab <- cbind(round(emindist[exn1],3), round(emindistsqrtn1[exn1],3)) colnames(tab) <- c("expected min","sqrt(n-1) times exp min") rownames(tab) <- (exn1+1) tab
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9504109770159683, "lm_q1q2_score": 0.8115680502858688, "lm_q2_score": 0.8539127492339909, "openwebmath_perplexity": 1065.524004228016, "openwebmath_score": 0.7244353890419006, "tags": null, "url": "https://math.stackexchange.com/questions/2412722/average-shortest-distance-between-some-random-points-in-a-box?noredirect=1" }
c = a @ b np.linalg.matrix_rank(c) 5 c.shape (50, 12) ### Shifting Transform a reduced rank matrix into a full-rank matrix without significant changes to the data. $\widetilde{\mathbf{A}} = \mathbf{A} + \lambda\mathbf{I}$ $\underbrace{\begin{pmatrix} 2 & 4 & 5 \\ -2 & -4 & -2 \\ 2 & 4 & 8 \\ \end{pmatrix}}_{\mathbf{\underset{A}{Rank 2}}} + \underset{\lambda}{.0001} \underbrace{\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{pmatrix}}_{Identity} = \underbrace{\begin{pmatrix} 2.0001 & 4 & 5 \\ -2 & -3.9999 & -2 \\ 2 & 4 & -7.9999 \\ \end{pmatrix}}_{\mathbf{\underset{B}{Rank 3}}}$ a = np.matrix('2 4 5; -2 -4 -2; 2 4 -8') np.linalg.matrix_rank(a) 2 b = a + (.0001 * np.eye(3,3)) b matrix([[ 2.0001, 4. , 5. ], [-2. , -3.9999, -2. ], [ 2. , 4. , -7.9999]]) np.linalg.matrix_rank(b) 3 ### Vector Span with Rank
{ "domain": "imti.co", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754515389344, "lm_q1q2_score": 0.8049637678177641, "lm_q2_score": 0.8175744850834648, "openwebmath_perplexity": 2873.933939181521, "openwebmath_score": 0.5088154077529907, "tags": null, "url": "https://imti.co/linear-algebra-matrices/" }
FYI, also remember that for right angled triangles and isosceles/equilateral triangles, you can calculate the 3rd side or the perimeter if the area is given as shown in the question discussed in this thread (by applying the relation, $$(a+b)^2 = a^2+b^2+2ab$$ and noticing that 0.5*ab represents the area of the triangle). 2. For rectangles and squares, the diagonals of these 2 shapes, divide these rectangles and squares into 2 congruent or same right angled triangles. The points mentioned above in 1) thus also apply these shapes as well. Hope this answers your question. Let me know if there are any other questions. Attachments Rect, Square and Triangle.jpg [ 36.37 KiB | Viewed 33394 times ] Intern Joined: 24 Jun 2015 Posts: 46 Re: The hypotenuse of a right triangle is 10 cm. What is the  [#permalink] ### Show Tags 18 Jul 2015, 16:44 Engr2012 wrote: luisnavarro wrote:
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9588471131345144, "lm_q1q2_score": 0.8206303997797177, "lm_q2_score": 0.8558511451289038, "openwebmath_perplexity": 1056.1023628640028, "openwebmath_score": 0.7589067816734314, "tags": null, "url": "https://gmatclub.com/forum/the-hypotenuse-of-a-right-triangle-is-10-cm-what-is-the-93911.html" }
java, performance, strings, interview-questions Title: Check if a string is a valid english word, and convert to a valid english word This is an interview question. For the purpose of the question, a valid English word is a string that begins with an uppercase English letter, and the rest of the string contains only lowercase English letters. I needed to implement two functions:
{ "domain": "codereview.stackexchange", "id": 32123, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, strings, interview-questions", "url": null }
graph-theory Title: What is the name of a graph with local clustering coefficients equal to zero? I am struggling to find in literature a name for a kind of graph where all local clustering coefficients are equal to zero (or, at least, bounded). For instance, domino, a subset of cacti and all linear graphs belong to this class. I do not know if such objects are named. As pointed out in comments by Joshua Grochow, this is a definition of triangle-free graph.
{ "domain": "cstheory.stackexchange", "id": 4278, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory", "url": null }
# Simulation of a Poisson Process I am trying to simulate the compound Poisson process using the next algorithm that I found in a textbook on stochastic processes. 1. Let $S_0 = 0$. 2. Generate i.i.d. exponential random variables $X_1, X_2, \ldots$ 3. Let $S_n=X_1+\cdots + X_n,$ for $n = 1, 2, \ldots$ 4. For each $k = 0, 1, \ldots,$ let $N_t = k,$ for $S_k\le t\le S_{k+1}$ S <- vector(mode="integer", length=100) S[1] = 0 ## Generation of Exponential random variables with parameter lambda X <- rexp(n=100, rate=0.1) for(n in 1:100){ S[n] = sum(X[1:n]) } But, I am not clear about how to write the step $4$, maybe I need to put the integer between two $S_k$ (the arrival times)? I am interested in the counting process $N_t$. Furthermore, how do you plot it?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9465966686936262, "lm_q1q2_score": 0.8119604289743912, "lm_q2_score": 0.8577681031721325, "openwebmath_perplexity": 538.9688179585276, "openwebmath_score": 0.625088095664978, "tags": null, "url": "https://stats.stackexchange.com/questions/308730/simulation-of-a-poisson-process" }
c, opengl, glsl static void create_window(int32_t width, int32_t height) { // create a window class static WNDCLASSA const wndclass = { .style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC, .lpfnWndProc = &WinProc, .lpszClassName = "0", }; RegisterClassA(&wndclass); // create a window HWND const window_handle = CreateWindowA(wndclass.lpszClassName, "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, NULL, NULL); // create a device context HDC const device_context = GetDC(window_handle); // create an opengl context create_opengl_context(device_context); // load opengl extensions after creating an opengl context load_extensions(); // setup global window
{ "domain": "codereview.stackexchange", "id": 40198, "lm_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, opengl, glsl", "url": null }
c#, performance, multithreading, uwp if (indexOfA < indexOfStar || indexOfD < indexOfStar) { int startIndex; if (indexOfA < indexOfD) startIndex = indexOfA; else startIndex = indexOfD; if (startIndex < 0) return; oneMessage = appData.readBuffer.Substring(startIndex, indexOfStar + 1); appData.readBuffer = appData.readBuffer.Remove(0, indexOfStar + 1); } } else return; if (oneMessage == "") return;
{ "domain": "codereview.stackexchange", "id": 22963, "lm_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, multithreading, uwp", "url": null }
particle-physics To give another example, the Higgs was postulated based on mathematical concerns, and we found it. But saying "the" Higgs is a little misleading. The truth is that there was a job that needed to be done in the standard model, giving the weak gauge bosons mass without violating the gauge symmetry, so we could be confident that there was something that was doing that job, we just weren't sure exactly what. There were a whole family of possible Higgs particles that could do the job. So, the odds that any one arrangement of particles would turn out to be right was quite low, but the odds that one of them existed was quite high. Last I heard, the particle physicists were a bit disappointed because the evidence was pointing to the simplest Higgs model that doesn't point to new physics at even higher energy levels.
{ "domain": "physics.stackexchange", "id": 90843, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics", "url": null }
homework-and-exercises, fluid-dynamics, vector-fields, flow the streamlines. The difference in stream function between two adjacent streamlines is equal to the volumetric throughput rate between them. The residence time for the flow encompassed by two adjacent streamlines is equal to the spatial volume between the streamlines divided by the volumetric throughput rate between them. So you just make the differences in stream function proportional to the spatial volume between adjacent streamlines. How you would achieve such a flow is an entirely separate matter.
{ "domain": "physics.stackexchange", "id": 47802, "lm_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, fluid-dynamics, vector-fields, flow", "url": null }
general-relativity, gauge-theory, curvature, gauge-invariance, gauge \end{equation} where $\hat{F}$ is some nonlinear function and the index $H$ stands for Harmonic. Is this correct thus far? Then, the thing that puzzled me is that he claims that the field equations reduce to $R^H_{\mu\nu}=0$, but $G_{\mu\nu}$ also contains the Ricci scalar. So what, exactly, happens with the Ricci invariant $R$. Is it zero in second derivatives? Your understanding is correct, I think. We can decompose the Ricci tensor into a part that is the d'Alembertian of the metric and a combination involving the harmonic functions $H^{\alpha}$. $$R_{\alpha\beta}=R^{H}_{\alpha\beta} - H_{(\alpha,\beta)}$$ I think that the EFEs in the question are necessarily considered in the vacuum case. In harmonic coordinates, the EFEs reduce to $R^{H}_{\mu\nu}=0$, which involves the reasoning above, as well as the fact that in vacuum, $G_{\mu\nu}=0$ is equivalent to $R_{\mu\nu}=0$. The relevant statement is the following:
{ "domain": "physics.stackexchange", "id": 84979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, gauge-theory, curvature, gauge-invariance, gauge", "url": null }
formal-languages, operational-semantics $e_1 \to e_2$, stating that expression $e_1$ transitions to state $e_2$ in one step $e \space \text{final}$, stating that expression $e$ is a final state of the system. Here are some example inference rules in a language with arithmetic and function abstraction: $$ \frac{}{n \text{ final}} $$ $$ \frac{}{n+0 \to n} $$ $$ \frac{n + m \to k}{s(n) + m \to s(k)} $$ $$ \frac{}{\lambda x. e \ \text{final}} $$ $$ \frac{(\lambda x. e_1)e_2}{[e_2/x]e_1} $$ Most languages do not have a formal definition, including Java (as far as I know). There are also other methods for defining the semantics of a language, but for describing an optimization, I believe structural dynamics is a wise choice, as it has a natural notion of time complexity (the number of transitions).
{ "domain": "cs.stackexchange", "id": 7688, "lm_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, operational-semantics", "url": null }