text
stringlengths
1
1.11k
source
dict
motor 3 - although major times that means spark free, one possible mean of spark is from static energy on the rotor, that sometimes find the bearings as the short circuit to discharge, resulting in wear to the bearing, but that in not so common and have some means of counter-measure. This is only a small list of electrical motors types. Mechanical transmission Note: You called that gearing but it's not the only way to do it. I will refer to mechanical transmission That is other topic. Motors run efficiently and have more torque at certain rotations, so you put for example a reducing transmission and get less speed and more torque. Suppose a motor spin at 4000 RPM and have a 0.1Kg-cm of torque, assuming a reduction of 100:1 (that is 100 turn in the input result in 1 turn at the output) you should get 400 RPM and 1Kg-cm of torque.1 1 - This is a theoretical example, the transmissions are not 100% efficiently so you lose some power Some types of transmissions that can have different ratios
{ "domain": "robotics.stackexchange", "id": 283, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "motor", "url": null }
javascript, performance, jquery Title: Toggling a class sharing a common class with a link I have a bit of jQuery that does one thing on mobile, and a different thing on desktop. On mobile it toggles a class on a div that shares a common class with the link, on desktop it does the same, except on hover. It all works, but I found that when I had it on mobile and clicked the links a few times in quick succession (maybe 10 -15 presses of different links) my browser would suddenly freeze and then after a few seconds catch up, but every press afterwards would increase in hang-time, even if you gave it a few minutes to catch up. I did a little bit of browser profiling and it stated that the if statement was the guilty section of code, but I'm not too sure how to make this run more cleanly. Is it the fact I am running this based off of window size? Codepen $(window).on('resize', function() { // Usually if screen width is less than 480px wide but for testing it's greater than 10px if ($(this).width() > 10) {
{ "domain": "codereview.stackexchange", "id": 13425, "lm_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, performance, jquery", "url": null }
python, performance, programming-challenge, complexity … with a docstring, and a data structure that takes advantage of hashing to avoid O(n2) performance. With an implementation that is so succinct, it might not be worth defining as a function after all. So, basically, you have no functions in your code. It's hard to analyze eighty-something lines of code all at once without having it broken down into smaller self-contained chunks. There is also no way to get an overview of how your program works. Code should be compartmentalized and composable. This is just a corollary to the first point. Say, hypothetically, that we no longer cared about rhyming. With a well designed program, you should be able to easily disable the code that implements rhyming. That's not the case with your code — your equivalent dictionary is mentioned all over the place. Trivial special cases aren't worth the trouble. Why bother writing this? # return yes if the first line was 0 if inlen == 0: print("yes") exit(0)
{ "domain": "codereview.stackexchange", "id": 24553, "lm_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, programming-challenge, complexity", "url": null }
solution of differential equations. Should be brought to the form of the equation with separable variables x and y, and … Substituting t = 0 in the solution (*) obtained in part (b) yields. Use DSolve to solve the differential equation for with independent variable : From basic separable equations to solving with Laplace transforms, Wolfram|Alpha is a great way to guide yourself through a tough differential equation problem. Solve the system with the initial conditions u(0) == 0 and v(0) == 0. Solve a System of Differential Equations. Starting with. We are going to be looking at first order, linear systems of differential equations. Hot Network Questions What is the lowest level character that can unfailingly beat the Lost Mine of Phandelver starting encounter? We will call the system in the above example an Initial Value Problem just as we did for differential equations with initial conditions. First write the system so that each side is a vector. Differential equations are
{ "domain": "msurma.pl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357237856482, "lm_q1q2_score": 0.81161249732262, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 430.58297011142395, "openwebmath_score": 0.7870026230812073, "tags": null, "url": "http://www.msurma.pl/ve00ubj5/ce2708-solving-system-of-differential-equations-with-initial-conditions" }
special-relativity, particle-physics Title: Relativistic Kinematics - Proton-proton collision I am stuck on the following question: A proton of total energy $E$ collides with a proton at rest and creates a pion in addition to the two protons: $$p+p \rightarrow p+p+ \pi^{0} $$ Following the collision, all three particles move at the same velocity. Show that $$E = m_p c^2 + \left(2+ \displaystyle \frac{m_{\pi}}{2m_p} \right) m_{\pi}c^2 $$ where $m_p$ and $m_{\pi}$ are the rest masses of the proton and pion respectively. I have tried conserving energy to get: $$E + m_p c^2 = 2m_p \gamma (v) c^2 +\gamma (v) m_{\pi} c^2$$ The issue is, what do we do about the $\gamma$ (where $\gamma$ is the Lorentz factor)? Thanks - all help is appreciated. Conservation of energy on its own is usually not sufficient for this sort of problems; you also need to work with conservation of momentum, then resort to a number of nasty substitutions and whatnot. Instead, why not go for conservation of 4-momentum? $$p_1+p_2=q_1+q_2+q_\pi,$$
{ "domain": "physics.stackexchange", "id": 40243, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, particle-physics", "url": null }
ros gist_extractor.cpp #include "/home/andy/Development/lear_gist-1.2/gist.h" #include "/home/andy/Development/lear_gist-1.2/standalone_image.h" extern "C" { #include "/home/andy/Development/lear_gist-1.2/gist.h" #include "/home/andy/Development/lear_gist-1.2/standalone_image.h" float *color_gist_scaletab(color_image_t*, int, int, const int *); } // some stuff float *gist_descriptor = color_gist_scaletab(args); //function defined in lear_gist Lear gist is located at /Development/lear_gist-1.2 and the directory is given below. In addition, color_gist_scal ar.ppm gist.c Makefile standalone_image.h compute_gist gist.h README standalone_image.o compute_gist.c gist.o standalone_image.c CMake File ## Set Variables set(GIST_PATH "/home/andy/Development/lear_gist-1.2") ## Specify additional locations of header files include_directories(include ${catkin_INCLUDE_DIRS} ${GIST_PATH})
{ "domain": "robotics.stackexchange", "id": 23924, "lm_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 }
java, battleship public class BattleshipDriver { //Global constant declarations public static final int GRID_ROWS = 8; public static final int GRID_COLS = 8; public static final int PLAYER_SHIPS = 6; public static final int PLAYER_GRENADES = 4; public static final int COMP_SHIPS = 6; public static final int COMP_GRENADES = 4; public static final int PROMPT_SIZE = 7; //Global variable declarations public static boolean cheats = false; public static int playerLives = PLAYER_SHIPS; public static int compLives = COMP_SHIPS; public static Scanner in = new Scanner(System.in); //Main battleship driver public static void main(String[] args) { String menuChoice = ""; //Main menu screen while (true) { printTitle(); System.out.println("To have the best possible experience, please set your console window to the maximum size."); System.out.println();
{ "domain": "codereview.stackexchange", "id": 40192, "lm_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, battleship", "url": null }
r, gene-expression, linear-regression Title: Doing plot with this data I have normalized expression values of some genes in some patients and the how many days they have survived from their diagnosis with cancer like below EDITED I have taken mean of the expression values for each patient and I have how many days each patient survived since diagnosis as below > I done so but nothing I got > fit <- survfit(Surv(time) ~ gene, data = km) > print(fit) Call: survfit(formula = Surv(time) ~ gene, data = km) n events median 0.95LCL 0.95UCL gene=-0.333140816 1 1 859 NA NA gene=-0.307846735 1 1 347 NA NA gene=-0.303559694 1 1 1339 NA NA gene=-0.290518776 1 1 61 NA NA The question is if these genes increase survival time or not but likely I am doing wrong By your help > fit <- coxph(Surv(time) ~ gene, data = km) > print(fit) Call: coxph(formula = Surv(time) ~ gene, data = km)
{ "domain": "bioinformatics.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": "r, gene-expression, linear-regression", "url": null }
terminology, molding Title: Looking for translation of "закладная втулка" (threaded bushing?) Sometimes we need a strong threaded joint in some part that is produced using molding. Say, this part itself is plastic. Then we design the part with a hole and insert there a.. "threaded bushing"? I don't know the proper name for this element in English. In Russian it is "закладная втулка" (insertable bushing/cylinder/etc - втулка/vtulka is a catch-all term for all things cylindrical that are used in an "axial manner" - something is inserted into them, or they are inserted somewhere, or both). I'm looking for a proper term in English. I googled for закладная втулка and found this example relevant to my text: In the text that I'm translating into English, these brass insertable threaded elements in a plastic part produced using molding look like this:
{ "domain": "engineering.stackexchange", "id": 2372, "lm_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, molding", "url": null }
### Differentiation A function $f(z)$ is differentiable at a point $z$ if the following limit exists: 1.9.24 $f^{\prime}(z)=\frac{\mathrm{d}f}{\mathrm{d}z}=\lim_{h\to 0}\frac{f(z+h)-f(z)}{% h}.$ ⓘ Symbols: $\frac{\mathrm{d}\NVar{f}}{\mathrm{d}\NVar{x}}$: derivative of $f$ with respect to $x$ and $z$: variable Permalink: http://dlmf.nist.gov/1.9.E24 Encodings: TeX, pMML, png See also: Annotations for 1.9(ii), 1.9(ii), 1.9 and 1 Differentiability automatically implies continuity. ### Cauchy–Riemann Equations If $f^{\prime}(z)$ exists at $z=x+iy$ and $f(z)=u(x,y)+iv(x,y)$, then
{ "domain": "nist.gov", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303425461246, "lm_q1q2_score": 0.8734538849761817, "lm_q2_score": 0.8824278741843884, "openwebmath_perplexity": 3098.455388470953, "openwebmath_score": 0.9758047461509705, "tags": null, "url": "http://dlmf.nist.gov/1.9" }
quantum-mechanics, quantum-interpretations, bells-inequality, epistemology Title: How can a superdeterministic theory ever match Quantum Mechanic's predictions? Superdeterminism says that we can observe violations from Bell's constraint for local hidden variable theories, if we assume the measurement choices are correlated, which they must be in a deterministic theory where all measurement choices are pre-decided at the Big Bang. It is correct that Bell's constraint gets violated if we assume correlations between measurement choices. But this does not automatically mean that the new hidden variable theory predicts the correlations exactly as predicted by quantum mechanics. If we consider that all measurement choices are correlated since the Big Bang, then those correlations would effectively be randomised. So, wouldn't it be impossible for the hidden variable theory to predict the exact correlations as predicted by Quantum Mechanics?
{ "domain": "physics.stackexchange", "id": 91099, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-interpretations, bells-inequality, epistemology", "url": null }
or fully infinite integration regions, integrands with singularities, and. In Python versions before 2. sDNA is freeware spatial network analysis software developed by Cardiff university, and has a Python API. It has been developed by Fredrik Johansson since 2007, with help from many contributors. You can code some parts of your project in Python and other parts in C++, and control the whole project from the Python console.
{ "domain": "mistertaglieforti.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982013788985129, "lm_q1q2_score": 0.8074010590476883, "lm_q2_score": 0.8221891261650248, "openwebmath_perplexity": 823.781689156319, "openwebmath_score": 0.6394795775413513, "tags": null, "url": "http://mistertaglieforti.it/numerical-double-integral-python.html" }
c#, .net, security, cryptography cryptoStream.Write(plainTextBytes,0,plainTextBytes.Length); cryptoStream.FlushFinalBlock(); byte[] cipherTextBytes = memoryStream.ToArray(); memoryStream.Close(); cryptoStream.Close(); string cipherText = Convert.ToBase64String(cipherTextBytes); return cipherText; } catch {} return ""; } public string Decrypt(string Data) { try { string passPhrase = "bananax97"; string saltValue = "pepper"; string hashAlgorithm = "MD5"; int passwordIterations = 1; string initVector = "koxskfruvdslbsxu"; int keySize = 128;
{ "domain": "codereview.stackexchange", "id": 14597, "lm_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#, .net, security, cryptography", "url": null }
ros FollowPath: plugin: "dwb_core::DWBLocalPlanner" debug_trajectory_details: True min_vel_x: -0.1 min_vel_y: 0.0 max_vel_x: 1.2 max_vel_y: 0.0 max_vel_theta: 0.6 min_speed_xy: 0.1 max_speed_xy: 1.2 min_speed_theta: 0.0 acc_lim_x: 4.0 acc_lim_y: 0.0 acc_lim_theta: 5.0 decel_lim_x: -2.5 decel_lim_y: 0.0 decel_lim_theta: -3.2 vx_samples: 5 vy_samples: 1 vtheta_samples: 20 sim_time: 1.7 linear_granularity: 0.05 angular_granularity: 0.025 transform_tolerance: 0.2 xy_goal_tolerance: 0.25 trans_stopped_velocity: 0.25 short_circuit_trajectory_evaluation: True stateful: True critics: ["RotateToGoal", "Oscillation", "ObstacleFootprint", "GoalAlign", "PathAlign", "PathDist", "GoalDist"] BaseObstacle.scale: 0.02 PathAlign.scale: 12.0 PathAlign.forward_point_distance: 0.1 GoalAlign.scale: 64.0 GoalAlign.forward_point_distance: 0.325 PathDist.scale: 64.0
{ "domain": "robotics.stackexchange", "id": 36060, "lm_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 }
c#, .net, image, console URL as part of a member name, should be Url; as a parameter name, should be url. I would move the nested types PicturePosition and NativeMethods to another file, named after the type (respectively, PicturePosition.cs and NativeMethods.cs). In this snippet: RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Control Panel\Desktop", true); switch (style) { case PicturePosition.Tile: key.SetValue(@"PicturePosition", "0"); key.SetValue(@"TileWallpaper", "1"); break;
{ "domain": "codereview.stackexchange", "id": 35506, "lm_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#, .net, image, console", "url": null }
python, algorithm, python-2.x def check_five(matrix): # Each cell in the state has counter for each direction, # only two rows are required since we can process the matrix # row by row as long as we know the status for previous row state = [[[0] * len(DIRECTIONS) for _ in matrix[0]] for _ in range(2)] white_win = False black_win = False for y, row in enumerate(matrix): # Swap rows in state that current (1) becomes previous (0) state = state[::-1] for x, color in enumerate(row): cell = state[CURRENT][x] for dir_index, (y_diff, x_diff) in enumerate(DIRECTIONS): prev_x = x + x_diff
{ "domain": "codereview.stackexchange", "id": 24037, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, algorithm, python-2.x", "url": null }
java, performance, playing-cards, community-challenge There is no limit to how many wildcards can be used, but if there are five or more wildcards then the wildcards themselves should return the highest possible straight. I'm not quite sure what the time complexity is in this method I have written, but I think worst case is between \$O(n)\$ and \$O(n^2)\$, I think it is about \$O(n^2 / 2)\$ or something. If anyone knows, please let me know. Is it possible to write this method with worst case not higher than \$O(n)\$? /** * Checks for a normal STRAIGHT. Returns null if no straight was found */ public class PokerStraight implements PokerHandResultProducer {
{ "domain": "codereview.stackexchange", "id": 13599, "lm_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, playing-cards, community-challenge", "url": null }
beginner, programming-challenge, haskell, primes Title: Naive primality test and summation I am starting to learn Haskell, so I coded a naive solution to the primality test and summation of primes (Project Euler Problem 10: sum of all primes under 2 million) . As I have an imperative programming background, can you tell me if my code is functional enough? isqrt :: Int -> Int isqrt n = floor(sqrt(fromIntegral n)) factors n = filter (\i -> n `mod` i == 0) [1..(isqrt(n))] is_prime n = (factors n) == [1] main = print (sum (filter is_prime [2..2000000])) You have some of the right idea, but it looks like you're writing in Lisp. ;-) There's no need to surround a single parameter in parentheses to pass it to a function, you mostly get this right so I think this one instance was just a slip up. factors n = filter (\i -> n `mod` i == 0) [1..(isqrt(n))] -- ^ ^
{ "domain": "codereview.stackexchange", "id": 12113, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, programming-challenge, haskell, primes", "url": null }
forces, electrostatics, electric-fields, work, potential-energy You are confusing two meanings of "increase" : an increase in magnitude and an increase in sign. Potential energy increases in magnitude if it gets further away from zero. This is equivalent to the force between the two charges becoming stronger - regardless of whether it is attractive or repulsive. PE increases in sign if it becomes more positive (and decreases if it becomes more negative). This is equivalent to the force between the two charges becoming less attractive and more repulsive. Increasing the -ve charge makes the potential energy increase in magnitude (the force becomes stronger) but decrease in sign (the force becomes more attractive).
{ "domain": "physics.stackexchange", "id": 89265, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, electrostatics, electric-fields, work, potential-energy", "url": null }
c, embedded if(velocity < 0){ out_sign = int2seven(10); tmp *= -1; }else{ out_sign = int2seven(0); } out_high = int2seven(tmp / 10); out_low = int2seven(tmp - (tmp/10) * 10); out = int2seven(0) << 21 | out_sign << 14 | out_high << 7 | out_low; IOWR_ALTERA_AVALON_PIO_DATA(DE2_PIO_HEX_LOW28_BASE,out); } /* * shows the target velocity on the seven segment display (HEX5, HEX4) * when the cruise control is activated (0 otherwise) */ void show_target_velocity(INT8U target_vel) { } /* * indicates the position of the vehicle on the track with the four leftmost red LEDs * LEDR17: [0m, 400m) * LEDR16: [400m, 800m) * LEDR15: [800m, 1200m) * LEDR14: [1200m, 1600m) * LEDR13: [1600m, 2000m) * LEDR12: [2000m, 2400m] */ void show_position(INT16U position) { }
{ "domain": "codereview.stackexchange", "id": 9878, "lm_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, embedded", "url": null }
classical-mechanics, fluid-dynamics, perpetual-motion Now of course I know this isn't possible but I just don't understand why? For this to be a perpetual motion machine, you need to transfer the block between containers. It's easy at the top, you just pick it up, translate and drop down. At the bottom, removing the block with arbitrarily négligeable energy cost from the oil is conceivable. You can even recover a bit more energy as oil will fill the space left empty by the block. However, to insert the block in the water at the bottom, you will need to push the block against the pressure of the water or find another way to create an empty space to slide the block into by raising part of the water. Deeper containers don't help as the pressure at the bottom is larger and therefore require more energy.
{ "domain": "physics.stackexchange", "id": 44325, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, fluid-dynamics, perpetual-motion", "url": null }
Baptiste Joseph Fourier in the early 19th century, the Fourier equations were invented to transform one complex function into another. Nevertheless, it is still a Gaussian profile and it occupies the whole. 12 $\begingroup$ Consider a white Gaussian noise signal $x \left( t \right)$. The Gaussian function, g(x), is defined as, g(x) = 1 σ √ 2π e −x2 2σ2, (3) where R ∞ −∞ g(x)dx = 1 (i. mpmath implements a huge number of special functions, with arbitrary precision and full support for complex numbers. This is the first of four chapters on the real DFT, a version of the discrete Fourier transform that uses real numbers to represent the input and output. To solve this problem more efficiently, we first. Topics include: 2D Fourier transform, sampling, discrete Fourier transform, and filtering in the frequency domain. Next we will explicitly calculate the Fourier transform of a Gaussian function. common in optics. On the basis of expanding a hard-edged aperture function as a finite sum of
{ "domain": "programex.pl", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9902915232319999, "lm_q1q2_score": 0.8252342807886346, "lm_q2_score": 0.8333245932423309, "openwebmath_perplexity": 676.1897974223843, "openwebmath_score": 0.7972910404205322, "tags": null, "url": "http://jrat.programex.pl/discrete-fourier-transform-of-gaussian.html" }
———————————————— ———————————————— ———————————————— | 1 8 20 27 | 1 8 20 27 | 1 8 20 27 | | | | | | 10 3 9 16 | 10 9 3 16 | 12 10 18 2 | | | | | | 18 12 4 5 | 18 4 12 5 | 15 6 3 16 | | | | | | 24 15 6 2 | 24 15 6 2 | 24 9 4 5 | ———————————————— ———————————————— ———————————————— | 1 8 20 27 | 1 10 16 27 | 1 10 16 27 | | | | | | 12 18 4 5 | 12 3 6 20 | 12 3 15 8 | | | | | | 15 3 6 16 | 15 8 9 4 | 18 24 2 5 | | | | | | 24 10 9 2 | 24 18 5 2 | 20 6 9 4 | ———————————————— ———————————————— ————————————————
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9740426390346569, "lm_q1q2_score": 0.8317474277692157, "lm_q2_score": 0.8539127492339909, "openwebmath_perplexity": 716.6340769982828, "openwebmath_score": 0.43379056453704834, "tags": null, "url": "https://puzzling.stackexchange.com/questions/81193/how-to-fill-4320-multiplicative-semi-magic-square" }
n × n matrix. Eigenvectors Given a square matrix 𝐴, an eigenvector of the matrix is a vector that does not change its direction when it multiplies by 𝐴. This normalization is the most commonly used. I heard of Lanczos algorithm that allows to find extreme eigenvalues. Scilab eigenvector matrix can differ from Matlab one. Create a model and include this geometry. Eigenvalues of both X X' and X' X will be the same. MATLAB Tutorial - Teil 4 - Plot, Axes, Figure mit Handle - Duration: 30:11. Eigenvectors and their geometric multiplicity; Eigenvalues and their algebraic multiplicity; Graphical demonstration of eigenvalues and singula Characteristic polynomial, eigenvalues, eigenvecto Matrix determinant from plu; Solve the system Ax=b; Basis for the column space. The origin is an equilibrium point for any system of linear differential equations with coefficient matrix A because A * o = o. Find the eigenvalues and eigenvectors of the following matrices. To find the eigenvalues and
{ "domain": "osteriarougeroma.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534392852384, "lm_q1q2_score": 0.8262126709314694, "lm_q2_score": 0.8418256412990657, "openwebmath_perplexity": 429.17433867820245, "openwebmath_score": 0.8734235167503357, "tags": null, "url": "http://lcoj.osteriarougeroma.it/how-to-find-eigenvalues-and-eigenvectors-in-matlab.html" }
inorganic-chemistry, hydrogen-bond it is well known that hydrogen bonds commonly exist in ammonia clusters and play an important role and gives a picture of some of the clusters that were assumed to exist. So there seems to be evidence of significant covalent hydrogen bonding in possible ammonia clusters, at least from the calculations. Calculated ammonia clusters: Whereas the reference[2] given by the OP was less positive: Surprisingly, no evidence has been found to support the view that $\ce{NH3}$ acts as a proton donor through hydrogen bonding, but does describe ammonia as a powerful hydrogen-bond acceptor. There is paper[3] which describes a hydrogen-bonded dimer that demonstrates how well ammonia can hydrogen-bond as an electron donor. Spectrum of hydrogen-bonded dimer of ammonia:
{ "domain": "chemistry.stackexchange", "id": 15723, "lm_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, hydrogen-bond", "url": null }
c#, algorithm, .net, datetime Title: Listing the weeks in a given month I need to take a month (defined as a start and end date) and return a set of date ranges for each week in that month. A week is defined as Sunday through Saturday. A good way to visualize it is if you double click on your Windows date in the start bar: The month of October 2011 has 6 weeks: 10/1-10/1 10/2-10/8 10/9-10/15 10/16-10/22 10/23-10/29 10/30-10/31 I can describe each week as a struct: struct Range { public DateTime Start; public DateTime End; public Range(DateTime start, DateTime end) { Start = start; End = end; } }
{ "domain": "codereview.stackexchange", "id": 16382, "lm_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#, algorithm, .net, datetime", "url": null }
compilers, data-flow-analysis Title: Why is it better to do the data flow analysis in the basic blocks I have been reading about compilers and it is said that doing the data flow analysis in the basic blocks is more optimal. Sadly, quoting the exact source, would be slightly hard as it is not in English, but a quote from wikipedia can also be used: Data-flow analysis is the process of collecting information about the way the variables are used, defined in the program. It attempts to obtain particular information at each point in a procedure. Usually, it is enough to obtain this information at the boundaries of basic blocks, since from that it is easy to compute the information at points in the basic block. Even though, in Wikipedia it is slightly explained, why the basic blocks are the preferred way, I still do not understand the benefits and if it is not obtained from the basic blocks, then from where? It isn't "better" in the sense that the analysis is more precise. It's just more compact and cheaper to compute.
{ "domain": "cs.stackexchange", "id": 11012, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "compilers, data-flow-analysis", "url": null }
$$P(T) = 0.15$$ (Probability of T fired) $$P(B)= 0.05$$ (Probability of B fired) $$P(J)= 0.80$$ (Probability of J fired) Let j be the event that Therese is told that J will keep his job. $$P(j|T) = 1/2$$ since A could mention either J or B to T. $$P(j|J) = 0$$ since if J is fired, A won't tell T that J’s job is safe. $$P(j|B) = 1$$ since if B is fired, Arlene has no choice but to tell T that J will keep his job. Setting Bayes theorem, to calculate T’s probability of being fired given A’s information, we can use Bayes theorem to get posterior probabilities $$P(T|j) = \frac{P(j|T) P(T)}{P(j|T) P(T) + P(j|J) P(J) + P(j|B) P(B)}$$ $$P(T|j) = \frac{1/2 \times 0.15}{1/2 \times 0.15 + 0 \times 0.8 + 1 \times 0.05}$$ $$P(T|j) = 0.6$$ However my intuition says that new information should not change T's probability from 0.15 at all, so am I wrong?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668668053618, "lm_q1q2_score": 0.8154900242380179, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 1044.8972473623692, "openwebmath_score": 0.7590411305427551, "tags": null, "url": "https://stats.stackexchange.com/questions/399126/twist-to-3-prisoners-problem-applying-bayes-rule" }
homework-and-exercises, electromagnetism Furthermore, I don't know the answer, and the two attempts that I have made gave me different results. I want to have this inconsistency resolved: Solution 1. Biot-Savart law: $$ \mathbf{B} = \frac{\mu_0 I}{4\pi r^2}\int_C\rm{d}\mathbf{l}\times \mathbf{\hat{r}} = \frac{\mu_0 I}{4\pi r^2}\int_C \rm{dl}=\frac{\mu_0 I}{4r} $$ since $\rm{d}\mathbf{l}\times \mathbf{\hat{r}} = dl\cdot 1\cdot \rm{sin}(\frac{\pi}{2})=dl$ and $\int_C dl=\pi r$ since the curve is the semicircle. Solution 2. Ampere's lag $$ \oint \mathbf{B}\cdot \rm{d}\mathbf{l} = B\cdot 2\pi r = I\mu_0\Rightarrow B = \frac{I\mu_0}{2\pi r} $$ One can make an educated guess that the magnetic field at $P$ is one-half the value of the magnetic field at the center of a current loop which is given by: $$B = \frac{\mu_0 I}{2R} $$ So your first approach is correct.
{ "domain": "physics.stackexchange", "id": 17595, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electromagnetism", "url": null }
lo.logic, pl.programming-languages, functional-programming, formal-methods, haskell A Compositional Program Logic for Polymorphic Higher-Order Functions (probably) pioneered Hoare logics for purely functional languages. This work is based on Hennessy-Milner logic and Milner's encoding of functions into processes, as described here: From Process Logic to Program Logic The work by Régis-Gianas et al mentioned in another answer is similar to the first work above by Honda/Yoshida. This has been extended to effectful ML-style languages: An Observationally Complete Program Logic for Imperative Higher-Order Functions A Logical Analysis of Aliasing in Imperative Higher-Order Functions Logical Reasoning For Higher-Order Functions With Local State Program Logics for Sequential Higher-Order Control Program Logics for Homogeneous Meta-Programming
{ "domain": "cstheory.stackexchange", "id": 2871, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lo.logic, pl.programming-languages, functional-programming, formal-methods, haskell", "url": null }
homework-and-exercises, newtonian-mechanics, classical-mechanics, orbital-motion Title: Path of a particle in central force motion A particle of mass $m$ moves in a plane, and is attracted to the origin with a force proportional to its distance $r$ from the origin. We are given the force $$F(r) = -k^2mr, \enspace(k>0)$$ and two acceleration components $\ddot{x}=-k^2x,\enspace\ddot{y}=-k^2y$. The problem is to show that the path of the particle is an ellipse, if it satisfies the initial conditions $x(0)=a, \dot{x}(0)=0, y(0)=0, \dot{y(0)}=b$, where $a,b>0$. Solution: Let $x=y_1, y_2 = y, y_3=x', y_4 = y'$. The system of two equations in two variables $$\ddot{x}=-k^2x,\enspace\ddot{y}=-k^2y$$ becomes a system of four equations in four variables. I can post the full solution but in brief, the solutions are $$x=a\cos kt, \enspace y=\frac{b}{k}\sin kt$$ and therefore $$\frac{x^2}{a^2}+\frac{y^2k^2}{b^2}=\cos^2kt+\sin^2kt=1.$$
{ "domain": "physics.stackexchange", "id": 77456, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, classical-mechanics, orbital-motion", "url": null }
Q.E.D. (Whilst the expression could further be simplified, at this point it satisfies the definition of CNF). 2) DNF: \begin{align*} &\ (((p_3 \lor p_1) \land (p_2 \to p_1)) \land (p_3 \leftrightarrow p_2)) & \text{(Given)} \\ \equiv &\ (((p_3 \lor p_1) \land (\neg p_2 \lor p_1)) \land (p_3 \leftrightarrow p_2)) & \text{(Simplification of implication)} \\ \equiv &\ (((p_3 \lor p_1) \land (\neg p_2 \lor p_1)) \land (( p_3 \land p_2 ) \lor (\neg p_3 \land \neg p_2))) & \text{(Simplification of biconditional)} \\ \equiv &\ ((p_1 \lor (\neg p_2 \land p_3)) \land (( p_3 \land p_2 ) \lor (\neg p_3 \land \neg p_2))) & \text{(Distribution of disjunction over conjunction)} \\ \equiv &\ ((p_1 \land ( p_3 \land p_2 )) \lor (p_1 \land (\neg p_3 \land \neg p_2)) \lor ((\neg p_2 \land p_3) \land ( p_3 \land p_2 )) \lor ((\neg p_2 \land p_3) \land (\neg p_3 \land \neg p_2))) & \text{(Distribution of conjunction over disjunction)} \\ \end{align*} Q.E.D. (As above, sufficient albeit messy).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.953966101527047, "lm_q1q2_score": 0.8433434984605045, "lm_q2_score": 0.8840392725805822, "openwebmath_perplexity": 251.25907033862993, "openwebmath_score": 0.9997722506523132, "tags": null, "url": "https://math.stackexchange.com/questions/2844918/determine-both-the-conjunctive-and-disjunctive-normal-forms-for-the-following-ex" }
c++, algorithm, image, matrix, c++20 } os << "\n"; } os << "\n"; } else if (size.size() == 3) { for(std::size_t z = 0; z < size[2]; ++z) { for (std::size_t y = 0; y < size[1]; ++y) { for (std::size_t x = 0; x < size[0]; ++x) { // Ref: https://isocpp.org/wiki/faq/input-output#print-char-or-ptr-as-number os << +at(x, y, z) << separator; } os << "\n"; } os << "\n"; } os << "\n"; } }
{ "domain": "codereview.stackexchange", "id": 45545, "lm_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++, algorithm, image, matrix, c++20", "url": null }
c#, parsing, rubberduck, antlr private readonly string _identifierName; /// <summary> /// Gets the declared name of the identifier. /// </summary> public string IdentifierName { get { return _identifierName; } } private readonly string _asTypeName; /// <summary> /// Gets the name of the declared type. /// </summary> /// <remarks> /// This value is <c>null</c> if not applicable, /// and <c>Variant</c> if applicable but unspecified. /// </remarks> public string AsTypeName { get { return _asTypeName; } } private readonly bool _isSelfAssigned; /// <summary> /// Gets a value indicating whether the declaration is a joined assignment (e.g. "As New xxxxx") /// </summary> public bool IsSelfAssigned { get { return _isSelfAssigned; } }
{ "domain": "codereview.stackexchange", "id": 12717, "lm_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#, parsing, rubberduck, antlr", "url": null }
for internal consistency between the correlations of the Random Variables. March 2020 The values in my correlation matrix are real and the layout means that it is symmetric. ; 30 ( 12 ):2084-98. doi: 10.1159/000312641 condition over the range 0,1... Conversely, any such matrix can be expressed as a cor-relation matrix for some of! A correlation matrix, we assume the approximate model is a diagonal matrix can massively how! To one positive Definite matrices, Princeton, NJ, USA,.. Quite easy to verify that correlation matrices are positive semidefinite covariance or correlation matrices are positive ) in statistical.... Of references, which contain further useful references within of positive semidefinite correlation matrices has been up to quite a!, Osugi TT, Mueller B. IEEE Trans Pattern Anal Mach Intell a kind of covariance matrix is if! System, uses the correlation is a fundamental statistic that is not positive.! Estimates are guaranteed to have that property estimation with
{ "domain": "ac.rs", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765575409524, "lm_q1q2_score": 0.8368144837212008, "lm_q2_score": 0.8539127566694177, "openwebmath_perplexity": 594.6582991053846, "openwebmath_score": 0.7208228707313538, "tags": null, "url": "http://vrtoplica.mi.sanu.ac.rs/u7nj752/199b1d-correlation-matrices-positive-semidefinite" }
cc.complexity-theory, reference-request, computability, lower-bounds Although it seems related, I don't think this argument gives anything for $K(HALT_n)$. (It could be that the time-bounded Kolmogorov complexity of $HALT$ is large, as implied by the circuit complexity bound, but as the time restriction is relaxed the complexity drops off dramatically.) I think the analogous argument shows that, if we had an oracle to the halting problem, then we could support random-access queries to the lexicographically first incompressible string. But, we must make a series of adaptive queries, and this can't be reduced directly to $HALT$ as far as I know. Also, the query strings must be exponentially large afaik, so it ends up showing only that $HALT_{2^n}$ has complexity at least $2^n$ afaict, and this doesn't beat the ``folklore'' argument. My background in Kolmogorov complexity is rather weak unfortunately, is $K(HALT_n)$ already known by some other argument? Perhaps there's a trick using Symmetry of Information?
{ "domain": "cstheory.stackexchange", "id": 3861, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, reference-request, computability, lower-bounds", "url": null }
Describing all values of $m$ such that the corresponding solution $(x,y,z)$ exists is an open problem. For the reference (quite old though), see the book of Serpinskii, Remark after solution of problem 155. The book is available here: http://www.isinj.com/aime/250%20Problems%20in%20Elementary%20Number%20Theory%20-%20Sierpinski%20(1970).pdf However, something is known. For example, the equation $$\frac{x}{y}+\frac{y}{z}+\frac{z}{x}=m$$ has no solution in positive integers $(x,y,z)$ for $m=4n^2$, where $n∈Z$ and $3$ does not divide $n$. On the other hand, if $m=k^2+5$, $k\in\mathbb{Z}$ then our equation has a solution. The key idea to construct it is to note that is $(a,b,c)$ is a solution of $$a^3+b^3+c^3=mabc,$$ then one can take $x=a^2b, y=b^2c, z=c^2a,$ to produce solution for the given equation. Now, for $m=k^2+5,$ one can easily take $a=2,b=k^2-k+1$ and $c=k^2+k+1.$ Therefore, your special question for $m=4$ is solved. For the reference, A.V. Bondarenko.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347808797581, "lm_q1q2_score": 0.8098946977952101, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 686.7228307041323, "openwebmath_score": 1.0000097751617432, "tags": null, "url": "https://math.stackexchange.com/questions/848718/integer-values-of-fracxy-fracyz-fraczx" }
newtonian-mechanics, kinematics For your teacher to dismiss it as "not an equation" is appalling. It may be the case that the teacher is teaching from the book, and not from his or her own expertise in the subject. It can be disheartening to be taught by teachers who do not understand the subject they are teaching, but hang on in there, it gets better as you go on in your schooling.
{ "domain": "physics.stackexchange", "id": 76672, "lm_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, kinematics", "url": null }
photons, quantum-optics, identical-particles Title: Why are photons being identical particles? Recently, I study quantum optics and deal with quantization of EM field in a cavity. We know we can express/quantize vector potential in terms of $\hat{a},\hat{a}^{\dagger}$ to get a quantized EM field in a cavity. $$ \vec{A}(\vec{r},t)=\sum_{n,\sigma}\sqrt{\frac{\hbar}{2\epsilon_0\omega_n V}}\vec{e}_{n,\sigma}\Big[\hat{a}_{n,\sigma}e^{i(\vec{k}_n\cdot\vec{r}-\omega_nt)}+\hat{a}_{n,\sigma}^{\dagger}e^{-i(\vec{k}_n\cdot\vec{r}-\omega_nt)}\Big] $$ The quantized Hamiltonian is: $$ \hat{H}=\sum_{k}\hbar\omega_k(\hat{n}_k+\frac{1}{2}) $$ The eigenstate of quantized Hamiltonian is: $\left| n_1,n_2,n_3,... \right>=\left|n_1\right>\otimes\left|n_2\right>\otimes\left|n_3\right>...$ The state means there are $n_1$ photons in the first mode and $n_2$ photons in second mode and so on...
{ "domain": "physics.stackexchange", "id": 83397, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photons, quantum-optics, identical-particles", "url": null }
homework-and-exercises, special-relativity, optics, wavelength, doppler-effect 3) Light is neither emitted nor received at points of closest approach, or has been emitted and received at equal angles. In this case there will be no Doppler Shift, i.e. no dilation at all. Wikipedia: The transverse Doppler effect can be analysed from a reference frame where the source and receiver have equal and opposite velocities. In such a frame the ratio of the Lorentz factors is always 1, and all Doppler shifts appear to be classical in origin. In general, the observed frequency shift is an invariant, but the relative contributions of time dilation and the Doppler effect are frame dependent. Transverse Doppler effect in Wikipedia: https://en.wikipedia.org/wiki/Relativistic_Doppler_effect Thus, resolving tasks of this sort it is necessary to consider angles of emission/reception. Angles of emission/reception are tied with relativistic aberration formula. $$ \cos {\theta_0} = \frac {\cos {\theta_s} - \frac v c} {1- \frac v c \cos \theta_s} $$
{ "domain": "physics.stackexchange", "id": 42300, "lm_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, special-relativity, optics, wavelength, doppler-effect", "url": null }
beginner, haskell, computational-geometry var args = process.argv.slice(2); if (args.length < 1) { console.log("Please supply a width for the vector circle path"); } // The second and third argument can be used to offset the circle by X adn Y number of pixels var offsetXBy = 0; var offsetYBy = 0; if (args.length >= 2) { offsetXBy = parseFloat(args[1]); } if (args.length >= 3) { offsetYBy = parseFloat(args[2]); } function Coord(x, y) { var self = this; this.x = parseFloat(x); this.y = parseFloat(y); this.offset = function(offsetX, offsetY) { self.x += offsetX; self.y += offsetY; } } Coord.prototype.toString = function () { return `${this.x} ${this.y}` } function BezierCurve(x, y, c1, c2) { var self = this; this.x = x; this.y = y; this.c1 = c1; this.c2 = c2; this.offset = function(offsetX, offsetY) { self.x += offsetX; self.y += offsetY; self.c1.offset(offsetX, offsetY); self.c2.offset(offsetX, offsetY); } }
{ "domain": "codereview.stackexchange", "id": 21975, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, haskell, computational-geometry", "url": null }
java, linked-list /** * Empty this OrderedLinkedList. */ public void clear() { // reset header node head = new OrderedListNode("HEAD", null, null); // reset tail node tail = new OrderedListNode("TAIL", head, null); // header references tail in an empty LinkedList head.next = tail; // reset size to 0 theSize = 0; // emptying list counts as a modification modCount++; } /** * Return true if this OrderedLinkedList contains 0 items. */ public boolean isEmpty() { return theSize == 0; } /** * Return the number of items in this OrderedLinkedList. */ public int size() { return theSize; } /* * Return a String representation of this OrderedLinkedList. * * (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { String s = ""; OrderedListNode currentNode = head.next; while (currentNode != tail) { s += currentNode.dataItem.toString();
{ "domain": "codereview.stackexchange", "id": 18962, "lm_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, linked-list", "url": null }
organic-chemistry, computational-chemistry, molecular-dynamics So, is there any easy-to-use, free molecular energy minimization simulation program that can help me achieve this? A very simple way is using molecular mechanics: it only applies to very simple molecules, but it should be enough for your purpose. Avogadro is a free software which allows you to build structures and to minimize them via molecular mechanics, through a variety of "methods" (force fields). The software outputs an estimate of the energy of your geometry, which you can compare to that if other geometries (for instance, boat vs chair cyclohexane). Note that these results are very approximate, the methods work properly only in the case of neutral and covalent molecules, but anyway they provide good results for a qualitative analysis.
{ "domain": "chemistry.stackexchange", "id": 13345, "lm_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, computational-chemistry, molecular-dynamics", "url": null }
ros, matlab, gazebo, ros-kinetic Originally posted by Msan on ROS Answers with karma: 3 on 2018-04-04 Post score: 0 Original comments Comment by gvdhoorn on 2018-04-04: May I suggest a title change? Your question is very much about "matlab not receiving any topic data" (or something similar). Probably a network configuration issue. Make sure to set ROS_IP to the appropriate value on each involved host. See #q230737. Originally posted by gvdhoorn with karma: 86574 on 2018-04-04 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by Msan on 2018-04-04: Thank you! Yeah, it was a network problem configuration. I was able to thank to the info on that link.
{ "domain": "robotics.stackexchange", "id": 30530, "lm_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, matlab, gazebo, ros-kinetic", "url": null }
electromagnetism, waves, harmonic-oscillator, approximations Title: Is the harmonic oscillator approximation valid in occasion of very powerful fields? I noted that in physics, to study electromagnetic wave phenomena when there is a sinusoidal behaviour, often is used the approximation of harmonic oscillation. I tried to understand the basics of why and I found, for example: $$e^{ikx} \approx 1 + ikx +i^2\frac{k^2r^2}{2}+ \cdots $$ If we considered only the real part of the wave, we would have found the importance of the second term $kx$ which is the model of a recall force, used for the harmonic oscillator equation.
{ "domain": "physics.stackexchange", "id": 51677, "lm_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, waves, harmonic-oscillator, approximations", "url": null }
optics, experimental-physics, solid-state-physics, braggs-law $$\rho(\vec{r})=\sum_I \delta^3(\vec{r}-\vec{R}_I)$$ This leaves us with: $$I(\vec{R^\prime})\propto \dfrac{1}{{R^\prime}^2}\left|\sum_I e^{-i\vec{K}\cdot\vec{R}_I}\right|^2$$ This sum has sharp peaks at certain point, I did a graph in Desmos for you to play with it an realize it does has sharp points (don't skip this link, it's an important part of the explanation). The sharp points obviously can only occurs when all the terms of the sum has the maximum value of one. The question now is simple, is there a specific vector $\vec{K}$ that makes all terms in the above sum equal to one? The answer is yes, the vector is the reciprocal lattice vector $\vec{G}$. This is much easier to realize in one dimension where $R_I=am$ and $G=\frac{2\pi}{a}n$ where $a$ is the real lattice spacing and $n,m\in \mathbb{Z}$, put it on paper and see for yourself. For 3D generic periodic lattice: $$\vec{R}_I=m_1\vec{a}_1+m_2\vec{a}_2+m_3\vec{a}_3,\ \ \ m_1,m_2,m_3\in\mathbb{Z}$$
{ "domain": "physics.stackexchange", "id": 69786, "lm_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, experimental-physics, solid-state-physics, braggs-law", "url": null }
electromagnetic-radiation, visible-light, radiometry, photometry Title: Lambertian surface and the luminous intensity I am currently studying the basics of photometry to better understand the rendering equation of Kajiya. One thing I'm currently struggling with is Lambert's cosine law. Let's go over the premises: A lambertian surface scatters light evenly in all directions. The projected surface area decreases with the cosine of the viewing angle.
{ "domain": "physics.stackexchange", "id": 98464, "lm_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, visible-light, radiometry, photometry", "url": null }
optics, reflection, fiber-optics Title: Why does an optical fibre employ total internal reflection instead of just reflection? I learnt that an optic fibre uses the concept of total internal reflection (TIR) to transmit data at high speed, but why do they not use just simple mirrors instead of using refractive medium and making a light incident at an angle more than the critical angle, so that total internal reflection can occur? There are essentially two reasons: manufacturability and loss. Manufacturability Optical fibers can be mass produced very inexpensively (cents per meter) by putting preforms of different glass materials together, heating on a draw tower, and then drawing out into a long, thin fiber. This process enables making enormous amounts of fiber very rapidly. The resulting fiber is surprisingly strong, and can take a fair amount of abuse with no loss of performance (just don't kink them!).
{ "domain": "physics.stackexchange", "id": 97782, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, reflection, fiber-optics", "url": null }
cosmology, reference-frames, velocity It is useful to introduce comoving coordiates, because you investigate properties of components of the universe without always accounting for the change of $a$. For example if you want to understand structure formation, you can model this formation in comoving coordinates, and for example use a Fourier transformation to understand the behaviour of different comoving spatial modes, and only think about the ACTUAL size (at different times) of the structures in the end, when inserting $a$.
{ "domain": "physics.stackexchange", "id": 77836, "lm_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, reference-frames, velocity", "url": null }
python, multithreading, file-system, multiprocessing Title: Filewatcher compiler for watching different files I'm trying to create a filewatcher program that can watch different files. The files might have subfiles that are being imported into the main file, which is being represented by the file object. I'm feeling the code is a little messy and I would like to know how I can improve it. The input_watcher() is not there to stay, it is being replaced by a GUI eventually, but it's just there for testing. import multiprocessing import threading import os import time file_lock = threading.Lock() update_interval = 0.1 class FileMethods(object): def a_import(self): # do some sort of file manipulation # all different kinds of filewatching / compiling types # will be added as methods and also added to the compiler_methods class FileObject(FileMethods): def __init__(self, full_name, compiler):
{ "domain": "codereview.stackexchange", "id": 8730, "lm_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, multithreading, file-system, multiprocessing", "url": null }
filters, filter-design, finite-impulse-response Title: FIR filter with linear phase, 4 types I know there are 4 types of FIR filters with linear phase, i.e. constant group delay: (M = length of impulse response) Impulse response symmetrical, M = odd Imp. resp. symmetrical, M = even Imp. resp. anti-symmetrical, M = odd Imp. resp. anti-symmetrical, M = even each with its traits. Which of these types is most commonly used in FIR filter with linear phase design and why? :) When choosing one of these 4 types of linear phase filters there are mainly 3 things to consider: constraints on the zeros of $H(z)$ at $z=1$ (DC) and $z=-1$ (Nyquist) integer/half-integer group delay phase shift (apart from the linear phase) Type I filters (odd number of taps, even symmetry) have no constraints on the zeros at $z=1$ and $z=-1$, the phase shift is zero (apart from the linear phase), and the group delay is an integer value.
{ "domain": "dsp.stackexchange", "id": 973, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, filter-design, finite-impulse-response", "url": null }
c++, mergesort, heap // borrowed from libstdc++ __adjust_heap template <typename RandomAccessIterator, typename Distance, typename Tp, typename Compare> constexpr void adjust_heap(RandomAccessIterator first, Distance holeIndex, Distance len, Tp value, Compare comp) { const Distance topIndex = holeIndex; Distance secondChild = holeIndex; while (secondChild < (len - 1) / 2) { secondChild = 2 * (secondChild + 1); if (comp(*(first + secondChild), *(first + (secondChild - 1)))) secondChild--; *(first + holeIndex) = *(first + secondChild); holeIndex = secondChild; } if ((len & 1) == 0 && secondChild == (len - 2) / 2) { secondChild = 2 * (secondChild + 1); *(first + holeIndex) = *(first + (secondChild - 1)); holeIndex = secondChild - 1; } push_heap(first, holeIndex, topIndex, value, comp); }
{ "domain": "codereview.stackexchange", "id": 43346, "lm_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++, mergesort, heap", "url": null }
computability, undecidability, semi-decidability Title: What is the difference between undecidable language and Turing Recognizable language? I was wondering what is the difference difference undecidable language and Turing recognizable language. I've seen in some cases where they ask: Prove that the language $ A_{TM} = \{ \ <M,w> | \ M \mbox{ is a Turing Machine accepting } w\}$ is undecidable. Prove that the language $ A_{TM} = \{ \ <M,w> | \ M \mbox{ is a Turing Machine accepting } w\}$ is Turing Recognizable. Are they the same thing? Can someone elaborate on this issue? Another one, is the question at hand is known as the halting problem? Or is it different from halting problem? A language $L$ is decidable if there exists a Turing machine $M$ such that: If $x \in L$ and $M$ is run with input $x$, then $M$ halts at an accepting state. If $x \notin L$ and $M$ is run with input $x$, then $M$ halts at a rejecting state.
{ "domain": "cs.stackexchange", "id": 10811, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computability, undecidability, semi-decidability", "url": null }
collections, groovy, closure Title: Remove list of files from another list of files by their name In groovy I have a list of files A and also another list of files B. I want to remove all the files from A that have a filename that also occurs in the list of files B. I wrote the following code: List<File> removeByName(final List<File> files, final List<File> removalFiles) { final Set<String> removalNames = removalFiles.collect { it.name }.toSet() files.findAll { ! removalNames.contains(it.name) } } Unfortunately I cannot use the remove method in the Collection class because two files are not equal even if they have the same file name. Are there any methods that I am missing which could be used to make that code cleaner? Groovy's removeAll has an overload allowing use of a closure. This would enable you to completely ditch this method in favor of something like: files.removeAll { removalFiles.collect { f -> f.name }.contains(it.name) }
{ "domain": "codereview.stackexchange", "id": 11608, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "collections, groovy, closure", "url": null }
infrared-radiation, sensor Title: Using infrared temperature sensor to measure water surface temperature Can I use infrared temperature sensor (such as TS118-3) to measure water surface temperature? I'm afraid some effects such as reflection of infrared waves from water surface and blinking because of the water ripple will make it impossible. Yes, water is the ideal material to measure because water (specifically ice water at 0 °C) is the material used to calibrate IR sensors for temperature readings. You do not have to worry about "reflection" as IR sensors do not themselves emit any of the IR (see page 3) used in the measurement, they just receive the IR emitted by the target.
{ "domain": "physics.stackexchange", "id": 18525, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "infrared-radiation, sensor", "url": null }
formal-languages, automata, finite-automata, compilers Title: A DFA for recognizing comments The following DFA is a lexical analyzer which is supposed to recognize comments. The lexical analyzer will ignore the comment and goes back to the state one. I'm told that there's something wrong with it but I can't figure it out. What's the problem? FWIW, those tiny signs are stars which are necessary for C-style comment: "/* comment */" The loop in the state three is "except *" There is no initial state, so there's no automaton. I suppose $1$ is the initial state. From state 4 you can still read several times the symbol $*$ and accept the comment. For example, the coment /*hello*/ is being accepted, but the comment /*hello**/ is not. So you need $\delta(4,*)=4$. Also, you need more transitions for the automaton to be a DFA. Remember that a DFA has a defined transition for all symbols from all states.
{ "domain": "cs.stackexchange", "id": 6450, "lm_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, automata, finite-automata, compilers", "url": null }
java, queue, collections, twitter, guava return message; } These two functions show that you don't understand what the InterruptedException is for. The InterruptedException wasn't left in the method signature by mistake; it signals a condition that correctly written programs should be prepared to handle -- namely, that some other thread has discovered that the blocking process should be cancelled. The quick fix would be to simply handle the interrupted condition in the Runnable. public void run() { while (! Thread.interrupted()) { extractHashtagsFromMessage(messageData.takeMessageFromQueue()); } }
{ "domain": "codereview.stackexchange", "id": 9722, "lm_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, queue, collections, twitter, guava", "url": null }
c++, beginner, cryptography, c++14, crypto++ texteChiffre= (char*)ciphertext.c_str(); /*std::cout <<"cipher text In HEX FORM:: "; for( int i = 0; i < ciphertext.size(); i++ ) { std::cout << "0x" << std::hex << (0xFF & static_cast<byte>(ciphertext[i])) << " "; } cout << endl; cout << endl;*/ strcpy(d.body,texteChiffre); strcpy(d.header.typeAlgo,typeAlgo); char* vector=(char*)iv.c_str(); strcpy(d.header.vector,vector); char* keyChar=(char*)key.c_str(); strcpy(d.header.key1,keyChar); return d; } /** Returns a crypted block of 1024 bytes with Blowfish algorithm. @param _data input array of 1024 bytes. @return crypted array. */
{ "domain": "codereview.stackexchange", "id": 9751, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, cryptography, c++14, crypto++", "url": null }
ros, navigation, base-global-planner, ros-indigo, base-local-planner Title: What are the subscribed topics of local planner from global planner? Who generates > nav_msg/Path local planner or global planner? If it is generated by global_planner then how local planner use it to avoid obstacle. Can we generate customized nav_msg/Path?? Actually how exactly the communication happens between global planner and local planner, using what topics or messages? Originally posted by malgudi on ROS Answers with karma: 88 on 2018-02-13 Post score: 0 Original comments Comment by gvdhoorn on 2018-02-13: I'm not sure, but it seems your question is at least partially answered by wiki/navigation/Tutorials/RobotSetup (Robot Setup section). Comment by malgudi on 2018-02-13: Is it black box? Comment by gvdhoorn on 2018-02-13:\ Is it black box?
{ "domain": "robotics.stackexchange", "id": 30026, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, navigation, base-global-planner, ros-indigo, base-local-planner", "url": null }
algorithm, assembly Title: Find the number in an array which is closest to an given number Exercise from an Assembly course I'm enrolled in: Find closest number. Add the following into the data section: nums dd 23h,75h,111h,0abch,443h,1000h,5h,2213h,433a34h,0deadbeafh This is an array of numbers. Write a program that receives a number x as input, and finds the dword inside the array nums, which is the closest to x. (We define the distance between two numbers to be the absolute value of the difference: |a-b|). Example: For the input of 100h, the result will be 111h, because 111h is closer to 100h than any other number in the nums array. (|100h - 111h| = 11h). Full exercise-sheet on GitHub - xorpd Here's my approach. Please pay attention to the comments which I've added to explain my ideas. format PE console entry start include 'win32a.inc' section '.data' data readable writeable nums dd 23h, 75h, 111h, 0abch, 443h, 1000h, 5h, 2213h, 433a34h, 0deadbeafh nums_end:
{ "domain": "codereview.stackexchange", "id": 26499, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, assembly", "url": null }
javascript, php, jquery, ecmascript-6, ajax '<h5>Oct 18, 2016</h5>' + '<p>' + comment.content + '</p>' + '<a class="reply" href="' + comment.id + '">Отговори</a>' + '</div>' + '<div class="post_comment" id="post-comment' + comment.id + '" style="display: none;">' + '<h3>Добави отговор</h3>' + '<form method="POST" class="comment_box answer_box" id="answer-form' + comment.id + '" action="' + data.id + '\\addanswer\\' + comment.id + '") }}">' + '<textarea id="textarea-answer" name="textarea-answer" class="form-control input_box"></textarea>' + '<button type="submit" id="saveButtonAnswer">Изпрати</button>' + '</form>' + '</div>' + '</div>' + '</div>';
{ "domain": "codereview.stackexchange", "id": 33444, "lm_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, php, jquery, ecmascript-6, ajax", "url": null }
complexity-theory, oracle-machines, pseudo-random-generators You can see my problem now: we can just apply the same strategy in presence of the oracle. Whenever the $\mathbf{BPP}^O$-algorithm makes an 'ordinary' deterministic step we do the same thing in our $\mathbf{P}^O$ algorithm. Whenever the $\mathbf{BPP}^O$-algorithm queries the oracle, we query the same oracle in our $\mathbf{P}^O$ algorithm and whenever the $\mathbf{BPP}^O$-algorithm uses a random bit we use a bit from our pseudo-randomgenarator. What could go wrong, short of the oracle magically coming to life, taking physical form and smashing our pseudo-random generator with an axe? So my question is:
{ "domain": "cs.stackexchange", "id": 15001, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, oracle-machines, pseudo-random-generators", "url": null }
complexity-theory, p-vs-np $x \gets y \lor z$. $x \gets y \land z$. $x \gets \lnot y$. For example, the formula above corresponds to the straightline program $x \gets a \land b$. $y \gets \lnot a$. $z \gets \lnot b$. $w \gets y \land z$. $o \gets x \lor w$. The value of the formula is the value of the last assignment. Notice that every variable other than the inputs is used exactly once. Straightline programs with this constraint correspond to formulas. If we remove the constraint, the we get circuits. The $\mathsf{P} \neq \mathsf{NP}$ conjecture can be stated equivalently as follows: SAT has no polynomial time algorithm. It turns out that the following conjecture (known as $\mathsf{P/poly} \neq \mathsf{NP}$) implies $\mathsf{P} \neq \mathsf{NP}$: SAT has no polynomial size circuits.
{ "domain": "cs.stackexchange", "id": 18462, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, p-vs-np", "url": null }
ruby, beginner, game, console def put_line puts ("-" * 80).gray end def put_bar puts ("#" * 80).gray puts ("#" * 80).gray end def draw_game #draw out the bingo board for each user puts "" puts "" @bingo_cards.each_with_index do |bingo,i| puts " #{@user_name[i]}" puts " 1 #{bingo[:a1]} | #{bingo[:b1]} | #{bingo[:c1]} | #{bingo[:d1]} | #{bingo[:e1]}" puts " --- --- --- --- ---" puts " 2 #{bingo[:a2]} | #{bingo[:b2]} | #{bingo[:c2]} | #{bingo[:d2]} | #{bingo[:e2]}" puts " --- --- --- --- ---" puts " 3 #{bingo[:a3]} | #{bingo[:b3]} | #{bingo[:c3]} | #{bingo[:d3]} | #{bingo[:e3]}" puts " --- --- --- --- ---" puts " 4 #{bingo[:a4]} | #{bingo[:b4]} | #{bingo[:c4]} | #{bingo[:d4]} | #{bingo[:e4]}" puts " --- --- --- --- ---" puts " 5 #{bingo[:a5]} | #{bingo[:b5]} | #{bingo[:c5]} | #{bingo[:d5]} | #{bingo[:e5]}" put_line puts " Bingo Number: #{@random}".red
{ "domain": "codereview.stackexchange", "id": 4355, "lm_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, beginner, game, console", "url": null }
python, python-3.x We can simply create a green color green_color = Fore.GREEN Fore.RESET # reset our color The module also have styles like BOLD, ITALIC, you might want to check the module out. Reduce print_table Complexity A lot of stuff are going on in print_table. The name is also misleading, what table are we printing here. It would not take much to get confused on what is really going on in the function. Why smashed this into one line? print(colored_number, end=' ') if number % LINE_WIDTH != 0 else print(colored_number) This looks smart but confuses the reader, he/she would need to pause a little to understand this piece of code. This following can also be improved. padding = max([int(len(color.name)) for color in Colors]) + len(str(MAX_NUMBER)) + EXTRA_PADDING Let's call our function display_numbers def display_numbers(numbers: dict) -> None: """Display a nice table with colorful numbers wrapped.
{ "domain": "codereview.stackexchange", "id": 40283, "lm_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", "url": null }
python, datetime, unit-testing, functional-programming, numerical-methods # aspectus: aspect+prospectus. iCalendars with astrological aspect events. # Copyright (C) 2017 Frederick Eugene Aumson # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
{ "domain": "codereview.stackexchange", "id": 24070, "lm_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, datetime, unit-testing, functional-programming, numerical-methods", "url": null }
navigation, husky, gmapping, transform Originally posted by Shanan on ROS Answers with karma: 26 on 2017-05-07 Post score: 0 Original comments Comment by Humpelstilzchen on 2017-05-09: Please attach tf tree and node graph Comment by Akif on 2017-05-09: Also check your laser scanner. There may be a problem with readings. Thanks all. Because gmaping published the tf message that was sent to robot through wifi, but tf messages do not deal with low bandwidth networks well. I install gmapping package into robot, and my computer only is responsible to visualize the built map. All work fine. Reference website: http://wiki.ros.org/tf/Design I revised the provided launch files in gmapping package according to my need. It is easy to ignore "use_sim_time" parameter which usually is set as true in launch file. In here, Its value should be set as false. Reference website: http://wiki.ros.org/Clock Originally posted by Shanan with karma: 26 on 2017-05-09 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 27831, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, husky, gmapping, transform", "url": null }
noise, bandpass of white noise. Indeed, even the answer by @StanleyPawlukiewicz that $\arctan(n_Q(t)/n_I(t))$ is uniformly distributed on $[-\pi/2,\pi/2]$ is disturbing because it suggests that it might be the case that $n_I(t)$ is always positive while $n_Q(t)$ has a more symmetric distribution. We really need $\operatorname{atan2}(n_Q(t),n_I(t))$ for defining the phase; $\arctan$ is inadequate for the job.
{ "domain": "dsp.stackexchange", "id": 7713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "noise, bandpass", "url": null }
star, gravity, degenerate-matter In a white dwarf or a neutron star, the fermions are packed very close together, and there's quite a lot of force due to gravity. However, the exclusion principle triumphs. Fermions near each other must have different energy levels; this leads to energy differences and degeneracy pressure pressure, which counteracts the force of gravity. Above a certain mass limit (the Chandrasekhar limit, roughly $\sim1.40M_{\odot}$), electron degeneracy pressure is no longer sufficient; the white dwarf collapses to a neutron star. There appears to be a similar limit for neutron stars, where neutron degeneracy pressure cannot support the remnant against gravity, and it collapses into a black hole.
{ "domain": "astronomy.stackexchange", "id": 1951, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "star, gravity, degenerate-matter", "url": null }
Trigonometry Questions for SSC CHSL Exam PDF: SSC CHSL Trignometry Questions download PDF based on previous year question paper of SSC CHSL exam. ____ 1. Review of Trigonometry for Calculus 1 U n i v ersit a s S a sk atchew n e n s i s DEO ET PAT-RIÆ 2002 Doug MacLean Review of Trigonometry for Calculus “Trigon” =triangle +“metry”=measurement =Trigonometry so Trigonometry got its name as the science of measuring triangles. What is the height of the mountain we can see in the distance? Read PDF Chapter 8 Trigonometry Test Would reading obsession disturb your life? 'O�(;P4*۳��ńK{t�>l�>tC�;a�n҇�܇�i7&�6lc:�J ��>�/0 �yc� endstream endobj 139 0 obj 321 endobj 103 0 obj << /Type /Page /Parent 88 0 R /Resources 105 0 R /Contents [ 120 0 R 122 0 R 124 0 R 126 0 R 128 0 R 130 0 R 132 0 R 136 0 R ] /B [ 104 0 R ] /MediaBox [ 0 0 612 792 ] /CropBox [ 0 0 612 792 ] /Rotate 0 >> endobj 104 0 obj << /T 100 0 R /P 103 0 R /R [ 262 255 269 275 ] /V 104 0 R /N 104 0 R >> endobj 105 0 obj << /ProcSet [
{ "domain": "statesindex.org", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639636617015, "lm_q1q2_score": 0.8277266356549429, "lm_q2_score": 0.8519527963298947, "openwebmath_perplexity": 5287.249423826645, "openwebmath_score": 0.4615281820297241, "tags": null, "url": "https://statesindex.org/ek-niranjan-yhftk/trigonometry-test-pdf-cbf37a" }
ros-kinetic <!--Wrist Joint--> <joint name="wrist_joint" type="revolute"> <parent link="forearm_link"/> <child link="wrist_link"/> <origin rpy="0 0 0" xyz="0 0 0.110"/> <limit lower="-2.5" upper="2.5" effort="1000" velocity="0.5"/> <axis xyz="0 1 0"/> </joint> <transmission name = "trans_wrist"> <type> transmission_interface/SimpleTransmission</type> <joint name= "wrist_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name = "motor_wrist"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> <!--Wrist Link-->
{ "domain": "robotics.stackexchange", "id": 34923, "lm_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-kinetic", "url": null }
sensor-msgs, android Originally posted by dornhege with karma: 31395 on 2013-08-21 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 15327, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sensor-msgs, android", "url": null }
c make clean show_results header 'TEST FINISH' dbg.h #ifndef __dbg_h__ #define __dbg_h__ #include <stdio.h> #include <errno.h> #include <string.h> #define ANSI_COLOR_RED "\x1b[31m" #define ANSI_COLOR_GREEN "\x1b[32m" #define ANSI_COLOR_YELLOW "\x1b[33m" #define ANSI_COLOR_BLUE "\x1b[34m" #define ANSI_COLOR_MAGENTA "\x1b[35m" #define ANSI_COLOR_CYAN "\x1b[36m" #define ANSI_COLOR_GREY "\x1b[30m" #define ANSI_COLOR_LPURPLE "\x1b[35m" #define ANSI_COLOR_RESET "\x1b[0m" #ifdef NDEBUG #define debug(M, ...) #else #define debug(M, ...) fprintf(stderr, "%s[DEBUG]%s %s%s%s:%s%s:%d%s: " M "\n", ANSI_COLOR_GREEN, ANSI_COLOR_RESET, ANSI_COLOR_GREY, __FILE__, ANSI_COLOR_RESET, ANSI_COLOR_LPURPLE, __func__, __LINE__, ANSI_COLOR_RESET, ##__VA_ARGS__) #endif #define log_test(M) fprintf(stdout, "%s[TEST]%s %s => " M "\n", ANSI_COLOR_CYAN, ANSI_COLOR_RESET, __func__);
{ "domain": "codereview.stackexchange", "id": 25603, "lm_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", "url": null }
cloning, plasmids, antibiotic-resistance Title: Why would a mammalian vector plasmid require an antibacterial resistance gene? I have been trying to understand the composition of plasmids used in recombinant DNA cloning, such as this: https://www.genecopoeia.com/wp-content/uploads/2020/02/pReceiver-M35-051818.pdf and I am wondering what purpose the ampicillin resistance gene has when transfected into a mammalian cell host (as it says it is for). I understand that ampicillin resistance is used for selection in bacterial cells so that only transformed bacteria are grown as well as ampicillin being needed to prevent bacterial contamination among a mammalian cell culture, but I don't see why mammalian cells require a resistance gene to an antibiotic. Thanks I think the assumption you are making is that the ampicillin resistance gene would save a purpose in the mammalian cells. It does not. As you said, it is only use during the cloning process to select the bacteria to replicate and produce more of it.
{ "domain": "biology.stackexchange", "id": 10503, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cloning, plasmids, antibiotic-resistance", "url": null }
rviz, pcl, pcl-ros Title: Combine pcl_ros with standalone pcl Hello. I would like to send to RViz my PointCloud2 data yet I'm running the standalone PCL. It would be possible to use the features from both pcl's in the same time? In case of the usage of standalone PCL there is no need to specify the dependency in the manifest.xml, how it would be in case if both packages installed? Thank you. Originally posted by szokei on ROS Answers with karma: 80 on 2011-08-22 Post score: 0 You really don't want to use standalone PCL inside ROS, as you can quickly run into issues since standalone PCL carries it's own copies of several ROS messages. If you can live with those features found in PCL 1.1 (minus the KinectGrabber), you should use the version of PCL found within the ROS Electric release (by depending on the ROS package "pcl"). If you need some feature found in PCL trunk, there may not be a very clean way to use it within ROS currently.
{ "domain": "robotics.stackexchange", "id": 6488, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, pcl, pcl-ros", "url": null }
coordinate, ascension, declination First, the rotation of the Earth causes the imagined ball of stars to appear to move around the sky. If you lay on your back, (in the norther hemisphere,) with your head to the north, the stars slowly slide by from left to right. There are two points however, where the stars don't appear to move: These two points are directly above the Earth's north and south poles. These two points, projected out into the sky are labeled the North, and South, Celestial Poles. Next, the Earth's equator is projected out into the sky and labeled the Celestial Equator.
{ "domain": "astronomy.stackexchange", "id": 3, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "coordinate, ascension, declination", "url": null }
machine-learning, python, r, machine-learning-model, azure-ml I did an experiment on Microsoft Azure Machine Learning Studio and it's giving a 100% coefficient of determination (I was using Boosted Decision Tree Regresion and Tunel Model Hyperparameters), I think that's because the ML knows that in a given month the TargetValue doesn't change it's value, so it does something like if(month == 2) PredictValue = 42611.27, what I can do? When testing this ML let's suppose that in the first day we got a TotalSalesToday: 1000000 so my ML returns 50000, and obviously this is not a logical and coherent answer regarding this value (1000000). Is there something I need to change in the data? What do we need in order to make the ML gives at least a coherent answer? Is there something I forget? Thanks in advance!! :) I would calculate the daily deltas of your sales data and implement a time series forecast model by using an Azure ML R/Python model module that predicts the daily deltas until the end of the month and returns the resulting monthly sum.
{ "domain": "datascience.stackexchange", "id": 4527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, python, r, machine-learning-model, azure-ml", "url": null }
QED. I would start from \begin{align} \operatorname{E}(X_i-\overline X)^2&=\operatorname{E}[(X_i-\mu)-(\overline X-\mu)]^2 \\&=\operatorname{E}(X_i-\mu)^2+\operatorname{E}(\overline X-\mu)^2-2\operatorname{E}(X_i-\mu)(\overline X-\mu) \\&=\sigma_i^2+\operatorname{Var}(\overline X)-2\operatorname{Cov}(X_i,\overline X) \end{align} So that, \begin{align} \sum_{i=1}^n \operatorname{E}(X_i-\overline X)^2&=\sum_{i=1}^n \sigma_i^2+n\operatorname{Var}(\overline X)-2\sum_{i=1}^n \operatorname{Cov}(X_i,\overline X) \\&=\sum_{i=1}^n \sigma_i^2+n\operatorname{Var}(\overline X)-2\sum_{i=1}^n \operatorname{Cov}\left(X_i,\frac{1}{n}\sum_{j=1}^n X_j\right) \\&=\sum_{i=1}^n \sigma_i^2+n\operatorname{Var}(\overline X)-\frac{2}{n}\sum_{i= 1}^n\sum_{j=1}^n \operatorname{Cov}(X_i,X_j) \end{align} Now I would try to write this expression in terms of $$\operatorname{Var}(\overline X)$$ only. I'd recommend proceeding as follows to avoid having to work with covariances:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813501370537, "lm_q1q2_score": 0.8007490673241738, "lm_q2_score": 0.8376199673867852, "openwebmath_perplexity": 765.6070963328948, "openwebmath_score": 0.9977888464927673, "tags": null, "url": "https://stats.stackexchange.com/questions/404174/prove-that-frac1nn-1-sum-i-1nx-i-overlinex2-is-an-unbi" }
ruby, ruby-on-rails Title: Setting receive_payment_on flag for employment applicants I would like to refactor this block, it looks clunky: # refactor me receive_payment_on = false config[:sections].each do |section| if section[:applicants] section[:applicants][:sections].each do |app_sec| if app_sec[:employment] && app_sec[:employment][:receive_payment_on] receive_payment_on = true end end end end Put your code into a method. So you get rid of the temporary variable, its cleaner and you can leave your method with a return as soon as you find the first true. (A break to leave the loop will have the same effect.) In addition to that I'm a big friend of guard conditions. Invert if section[:applicants] ... end to if !section[:applicants] next, so you have one nesting level less. ... config[:sections].each do |section| if !section[:applicants] next section[:applicants][:sections].each do |app_sec| if app_sec[:employment] && app_sec[:employment][:receive_payment_on]
{ "domain": "codereview.stackexchange", "id": 3433, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby, ruby-on-rails", "url": null }
$P\left(\overline{B}\mid A\right)=1-P\left(B\mid A\right)$ $P\left(\overline{B}\mid \overline{A}\right)=0.999$ $P\left(B\mid \overline{A}\right)=1-P\left(\overline{B}\mid \overline{A}\right)$ What I need to find is the chance that someone identified as a terrorist, is actually a terrorist. I express that through P(A | B) and use Bayes Theorem to find its value. $P\left(A\mid B\right)=\frac{P\left(A\cap B\right)}{P\left(B\right)}=\frac{P\left(B\mid A\right)\cdot P\left(A\right)}{P\left(B\mid A\right)\cdot P\left(A\right)+P\left(B\mid \overline{A}\right)\cdot P\left(\overline{A}\right)}$ The answer I get after plugging-in all the values is: $3.29\cdot {10}^{-3}$, the book's answer is $3.29\cdot {10}^{-4}$. Can someone help me identify what I'm doing wrong? Also, in either case, I find that it is very unintuitive that the probability of success is so small. If someone could explain it to me in more intuitive terms I'd be very grateful. You can still ask an expert for help
{ "domain": "plainmath.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918536478772, "lm_q1q2_score": 0.8401895848513526, "lm_q2_score": 0.8499711775577736, "openwebmath_perplexity": 559.3403583265025, "openwebmath_score": 0.8258181810379028, "tags": null, "url": "https://plainmath.net/94648/the-exercise-statement-roughly-assume" }
coach always sits in the list of ways will be 12 addition some. Red Lion Square London WC1R 4HQ the joined item as if they were only one.. And Answers this page is on permutation and Combination is a scoring topic and definite question any. Some restrictions gives rise to a situation of permutations with restrictions similar to i! That some items from the list D are seated together, will be 12 …... The team captain permutations Definition rise to a situation of permutations with restrictions: items not together: https //goo.gl/RDOlkW. Be created using the digits 0­9 the centre of the things, we it.: Boys Girls or Girls Boys = 5 = 5 is: { 3,1,1,1,2,2,3 is. Together, Treat the two digits use P permutations with restrictions items not together 7, 2 ): the answer 1,306,368,000! Its content is subject to our Terms and Conditions: https: //goo.gl/RDOlkW to see full... Be together can be classified into 4 types must not occur together items not together::! A scoring topic and definite
{ "domain": "com.br", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.968856165868213, "lm_q1q2_score": 0.8254197252156983, "lm_q2_score": 0.8519528019683106, "openwebmath_perplexity": 900.5457214596316, "openwebmath_score": 0.34036198258399963, "tags": null, "url": "http://rtlea.com.br/peyton-manning-qua/permutations-with-restrictions-items-not-together-2d0119" }
java, strings, datetime /** * Formats a date in any given format at UTC. * * <pre> * <code> * final Calendar moonLandingCalendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); * moonLandingCalendar.set(1969, 7, 20, 20, 17, 40); * final Date moonLandingDate = moonLandingCalendar.getTime(); * PrettyDate.toString(moonLandingDate, "yyyy-MM-dd") * >>> "1969-08-20" * </code> * </pre> * * * @param date * Valid Date object. * @param format * String representation of the format, e.g. "yyyy-MM-dd" * @return The given date formatted in the given format. */ public static String toString(final Date date, final String format) { return toString(date, format, "UTC"); }
{ "domain": "codereview.stackexchange", "id": 15404, "lm_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, strings, datetime", "url": null }
rosmake makedirs_with_parent_perms(self.log_dir) File "/opt/ros/hydro/lib/python2.7/dist-packages/rosmake/engine.py", line 91, in makedirs_with_parent_perms os.chown(p, s.st_uid, s.st_gid) OSError: [Errno 1] Operation not permitted: '/home/sara/.ros/rosmake/rosmake_output-20140225-192413' Traceback (most recent call last): File "/opt/ros/hydro/bin/rosmake", line 55, in <module> if rma.main(): File "/opt/ros/hydro/lib/python2.7/dist-packages/rosmake/engine.py", line 741, in main makedirs_with_parent_perms(self.log_dir) File "/opt/ros/hydro/lib/python2.7/dist-packages/rosmake/engine.py", line 91, in makedirs_with_parent_perms os.chown(p, s.st_uid, s.st_gid) OSError: [Errno 1] Operation not permitted: '/home/sara/.ros/rosmake/rosmake_output-20140225-192413' sara@sara:~$ What should I do ? Thanks a lot in advance Sarah
{ "domain": "robotics.stackexchange", "id": 17083, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosmake", "url": null }
You have to express $Ta_1$ under the form $\alpha a_1+\beta a_2$ and to express $Ta_2$ as $\gamma a_1+\delta a_2$. Then, the matrix of $T$ with respect to $\{a_1,a_2\}$ is $\left(\begin{smallmatrix}\alpha&\beta\\\gamma&\delta\end{smallmatrix}\right)$. There is another way of doing this. Let$$B=\begin{pmatrix}1&1\\0&1\end{pmatrix},$$ which is the change of basis matrix from $\{a_1,a_2\}$ to $\{e_1,e_2\}$. Then the matrix which you're after is$$B^{-1}.\begin{pmatrix}c&-s\\s&c\end{pmatrix}.B=\begin{pmatrix}c-s&-2s\\s&c+s\end{pmatrix},$$which is (not surprisingly) the same matrix that you got.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.977022630759019, "lm_q1q2_score": 0.8265048998777966, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 153.79172598302574, "openwebmath_score": 0.9997530579566956, "tags": null, "url": "https://math.stackexchange.com/questions/2463055/matrix-representation-of-a-rotation-wrt-a-non-canonical-basis" }
bed, format-conversion, gtf, gff You can install these tools with bioconda, or download them here. The gene_id is only achieved when using refTables (a format specified in UCSC's web browser), you can see a more elaborate answer here Obtaining Ucsc Tables Via Ftp And Converting Them To Proper Gff3 Via Genepredtogtf?. Other options Other scripts/tools That DO NOT produce a complete GTF file (lacking gene_id attributes) are: gtf2bed gtf2bed < foo.gtf | sort-bed - > foo.bed awk '{print $1"\t"$7"\t"$8"\t"($2+1)"\t"$3"\t"$5"\t"$6"\t"$9"\t"(substr($0, index($0,$10)))}' foo.bed > foo_from_gtf2bed.gtf -kscript from https://github.com/holgerbrandl/kscript: kscript https://git.io/vbJ4B my.bed > my.gtf pfurio/bed2gtf from https://github.com/pfurio/bed2gtf: python bed2gtf [options] <mandatory> AGAT AGAT Considering only the options that produce gene_ids attributes, bed2gtf and bed2gff are faster by ~3-4 seconds than UCSC's C binaries. More detailed instructions of this tools are explained in the sources linked.
{ "domain": "bioinformatics.stackexchange", "id": 2622, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bed, format-conversion, gtf, gff", "url": null }
matlab, filters, filter-design, finite-impulse-response, infinite-impulse-response Is there a way to get a true IIR filter from this function? I want to compare IIR anf FIR filters for the same specification and see what's better. Right now, I can't really compare when the results are basically the same. EDIT: Here is a sample script and corresponding desired response. It seems like I have to use a third party hosting site for this, sorry. close all; clear all;
{ "domain": "dsp.stackexchange", "id": 6956, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, filters, filter-design, finite-impulse-response, infinite-impulse-response", "url": null }
physical-chemistry, electrons, electronic-configuration To answer your question... In the first shell (n=1), we have:
{ "domain": "chemistry.stackexchange", "id": 2485, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, electrons, electronic-configuration", "url": null }
quantum-mechanics, operators, complex-numbers, eigenvalue, observables Given any observable $A$, if $P$ is one of the projection operators that it implicitly defines (through the spectral decomposition theorem), then a measurement of $A$ will result in a state $|\psi'\rangle$ that satisfies either $P|\psi'\rangle = |\psi'\rangle$ or $(1-P)|\psi'\rangle=|\psi'\rangle$. (I'm not trying to advocate any particular interpretation of quantum theory here; I'm just trying to be concise.) In terms of the state $|\psi\rangle$ prior to the measurement, the relative frequencies of these two possible outcomes are $\psi(P)$ and $\psi(1-P)$, respectively, using the abbreviation $$ \psi(\cdots)\equiv\frac{\langle\psi|\cdots|\psi\rangle}{\langle\psi|\psi\rangle}. $$
{ "domain": "physics.stackexchange", "id": 53034, "lm_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, operators, complex-numbers, eigenvalue, observables", "url": null }
python, csv, statistics Title: Computing average grades for students in a class I wrote up a simple averages calculator for student grades, based on this daily programming challenge. First, the script asks for the file name for the text file containing the student names and grades. It is formatted like so: JON 19 14 15 15 16 JEREMY 15 11 10 15 16 JESSE 19 17 20 19 18 The user is then asked how many assignments there are. While my solution works, it seems awfully verbose. Can you give me tips on "pythonic" ways to simplify the script? grade_avg_generator.py """Simple student grade manager""" from fileinput import input def import_data(grades_file, assignments): """Split the data into key value pairs.""" student_grades = dict() for line in input(grades_file): this_line = line.split() student_grades[this_line[0]] = [int(item) for item in this_line[1:assignments + 1]] return student_grades
{ "domain": "codereview.stackexchange", "id": 4410, "lm_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, csv, statistics", "url": null }
sets Title: Evaluating correctness of various definitions countable sets I was trying to understand the definition of countable set (again!!!). Wikipedia has a very great explanation: A set $S$ is countable if there exists an $\color{red}{\text{injective}}$ function $f$ from $S$ to the natural numbers $\mathbb N$. If such an $f$ can be found that is also surjective (and therefore $\color{red}{\text{bijective}}$), then $S$ is called countably infinite. In other words, a set is countably infinite if it has $\color{red}{\text{bijection}}$ with the $\mathbb N$. So I summarize: $S$ is countable iff $S\xrightarrow{injection}\mathbb N$ $S$ is countably infinite iff $S\xrightarrow{bijection}\mathbb N$ But then wikipedia confuses by stating following points: Theorem: Let $S$ be a set. The following statements are equivalent:
{ "domain": "cs.stackexchange", "id": 10644, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sets", "url": null }
c++, performance, algorithm, chess else if (!turn) { if (row > 0 && col < 6 && board[row - 1][col + 2] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row - 1, col + 2)); if (row > 1 && col < 7 && board[row - 2][col + 1] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row - 2, col + 1)); if (row < 7 && col < 6 && board[row + 1][col + 2] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row + 1, col + 2)); if (row < 6 && col < 7 && board[row + 2][col + 1] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row + 2, col + 1)); if (row < 6 && col > 0 && board[row + 2][col - 1] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row + 2, col - 1)); if (row < 7 && col > 1 && board[row + 1][col - 2] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row + 1, col - 2)); if (row > 1 && col > 0 && board[row - 2][col - 1] >= 0)pseudomoves.insert(pseudomoves.begin(),push(row, col, row - 2, col - 1));
{ "domain": "codereview.stackexchange", "id": 39278, "lm_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, algorithm, chess", "url": null }
c#, beginner // 2+1 -> Random.Next excludes maxValue (2 argument) chance = rnd.Next(1, 2 + 1); // chance == 1 -> player will not restore energy //Narcolepsy counter is the third one if (chance == 1 && statusesCounters[2] != 0) // chance needs to be equal to 1 and Narcolepsy needs to be active { Console.Write("Because of narcolepsy you don't feel better after trying to rest."); } else { // adding energy if (Hero.Energy >= 100) { Console.Write("Well you're already full of the energy."); } else { int recoveredEnergy; // Exhaustion - resting will give only half energy // Exhaustion counter is the seventh one if (statusesCounters[6] != 0) {
{ "domain": "codereview.stackexchange", "id": 39986, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner", "url": null }
javascript, optimization, jquery function addDiv(date, info) { var d = document.createElement('div'), s = document.createElement('h2'), p = document.createElement('p'); p.textContent = info; s.textContent = date; document.body.appendChild(s); document.body.appendChild(d); d.appendChild(p); d.style.display = 'none'; d.shown = false; d.displayinfo = 'block'; hidden[hidden.length] = d; trigger[trigger.length] = s; toggle([s], [d], PER_TRIGGER, [{'ev': 'click', 'func' : onclick}]); } alert('running') onclick = function(e) { e.style.display = e.shown ? 'none' : e.displayinfo; e.shown = !e.shown; }; defineTriggers(true); // adding btn var b = document.createElement('button'), f = document.getElementsByTagName('footer')[0]; f.appendChild(b); b.textContent = 'Add a Date'
{ "domain": "codereview.stackexchange", "id": 8971, "lm_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, optimization, jquery", "url": null }
complex-numbers, solid-mechanics Title: Antiplane shearing: singularities of $\vert\nabla\Phi\vert$ Suppose we wish to find the displacement field $(0, 0, \Phi(x,y))$ in an antiplane shear problem with a fracture along $0 < x < k, y = 0$. Then, according to my notes, $\vert \nabla\Phi\vert$ has "an inverse square root singularity at the crack tips, so that the displacement is finite." Can anyone please explain this sentence? In particular, why does the inverse square root singularity arise and why would this then imply a finite displacement? 1) Why does the singularity arise: The answer to this requires the solution of the governing equations and can be found in numerous text books. An online source is http://booksite.elsevier.com/samplechapters/9780123850010/Chapter_3.pdf 2) Why the displacement is finite at the crack tip: Very roughly speaking, the gradient of the displacement field (also called the strain) has the form $$ \nabla \phi = C x^{-1/2} + \dots $$ At $x = 0$ (the crack tip), the strain is infinite.
{ "domain": "physics.stackexchange", "id": 51840, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complex-numbers, solid-mechanics", "url": null }
pressure, stress-strain At first, to solve for the maximum pressure a given container could hold, I thought that maybe I could use Young's Modulus, which related stress on an object to the strain felt by an object. The change in 'length' of the sphere I would get by considering changing the radius of the sphere a small amount $dr$ and seeing what happened to a small element (that was my plan anyway). Then I realized that since the force applied onto the object wasn't really in the direction of stretching, but rather perpendicular to it (as the metal should stretch in the direction of the blue arrows(I think)) I thought maybe a better substitute would be Shear Modulus. But that didn't really make sense in my head.
{ "domain": "physics.stackexchange", "id": 23769, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pressure, stress-strain", "url": null }
mechanical-engineering, steel, stiffness And if for some reason you can't easily increase the thickness of the plate, you can consider a different beam structure. Currently, your beam is a simple rectangle. You can easily use a T-beam or an I-beam in order to stiffen the plate instead. Again, while I've provided some suggested links to online calculators feel free to search for and use others that you may prefer.
{ "domain": "engineering.stackexchange", "id": 4203, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, steel, stiffness", "url": null }
sum calculations again. }\) In multivariable calculus, we will eventually develop the idea of a definite integral over a closed, bounded region (such as the interior of a circle). It should be written out so you could type it into a calculator to evaluate if you wished. The exact area under a curve between a and b is given by the definite integral, which is defined as follows: When calculating an approximate or exact area under a curve, all three. Regarding the definite integral of a function $$f$$ over an interval $$[a,b]$$ as the net signed area bounded by $$f$$ and the $$x$$-axis, we discover several standard properties of the definite integral. (c) (5 Pts. They view how the convergence of Riemann sums as the number of subintervals get larger. On every subinterval, one can choose either the left or right value of the function, the lower or the larger of the two, or the value at a random point on the interval, or at its midpoint. Use symmetry to calculate definite integrals. -
{ "domain": "clandiw.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9907319852508434, "lm_q1q2_score": 0.8168208053559453, "lm_q2_score": 0.8244619306896955, "openwebmath_perplexity": 347.2748526542643, "openwebmath_score": 0.9633388519287109, "tags": null, "url": "http://clandiw.it/jqeo/definite-integral-as-the-limit-of-a-riemann-sum-calculator.html" }
c# Title: Norms, rules or guidelines for calculating and showing ETA/ETC for a process ETC = "Estimated Time of Completion" I'm counting the time it takes to run through a loop and showing the user some numbers that tells him/her how much time, approximately, the full process will take. I feel like this is a common thing that everyone does on occasion and I would like to know if you have any guidelines that you follow. Here's an example I'm using at the moment: int itemsLeft; //This holds the number of items to run through. double timeLeft; TimeSpan TsTimeLeft; list<double> avrage; double milliseconds; //This holds the time each loop takes to complete, reset every loop. //The background worker calls this event once for each item. The total number //of items are in the hundreds for this particular application and every loop takes //roughly one second. private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e) { //An item has been completed!
{ "domain": "codereview.stackexchange", "id": 3762, "lm_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#", "url": null }
which is used to define a vector space. This is a vector space. There are many diagrams to illustrate the physical meaning of the mathematical concepts, which essential for a full understanding of the subject. The name arises because a scalar scales a vector — that is, it changes the scale of a vector. A collection of 9-1 Maths GCSE Sample and Specimen questions from AQA, OCR, Pearson-Edexcel and WJEC = kb where k is a scalar quantity. There are many ways of writing the symbol for a vector. If you don't see any interesting for you, use our search form on bottom ↓ . A two-dimensional vector field is a function f that maps each point (x,y) in R2 to a two-dimensional vector hu,vi, and similarly a three-dimensional vector field maps (x,y,z) to hu,v,wi. Biography Paper: Francois Viete  In mathematics, physics, and engineering, a Euclidean vector is a geometric object that has . 10 Jan 2014 10. Free PDF download of NCERT Solutions for Class 12 Maths Chapter 10 - Vector Algebra solved by Expert
{ "domain": "cleanupthepackers.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713874477228, "lm_q1q2_score": 0.8008949145233167, "lm_q2_score": 0.8128673223709251, "openwebmath_perplexity": 542.805935340855, "openwebmath_score": 0.7808359265327454, "tags": null, "url": "http://cleanupthepackers.com/uaq0/vector-and-scalar-mathematics-pdf.html" }
thermodynamics, kinetics, calorimetry What is the standard method for estimating/calculating this increase in temperature, given the rate at which the stirring occurs and all the other necessary information? The work done to stir is based on the viscosity of the fluid. The faster you spin, the more work is necessary. In the classic experiment by Joule mentioned in the comments, a special stirring mechanism was used to have a large effect on the temperature. The experiment served to figure out the specific heat capacity of water (what energy is required to raise the temperature of a certain mass of water by a certain amount). You can read more about the experiment here.
{ "domain": "chemistry.stackexchange", "id": 11776, "lm_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, kinetics, calorimetry", "url": null }