Jump to content

Sensei

Senior Members
  • Posts

    7931
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Sensei

  1. When there is created kaon, there must be created anti-kaon to conserve Strangeness. The same is with the all other quantum numbers, Charmness, Topness, Bottomness. Physicists are searching for violations of conservations of quantum numbers.
  2. Daily consumption is typically measured in kcal, instead of kJ (multiply/divide by 4.1355 J/cal to convert) 8700 kJ = 2100 kcal Here is list of countries with mentioned daily kcal consumption: http://www.dailymail.co.uk/femail/article-2722815/Daily-calorie-intake-countries-world-revealed-surprise-U-S-tops-list-3-770.html Not surprisingly USA is on the (infamous) top of the list.
  3. The first thought is that your binary-search is total rubbish... function binarySearch(searchElement, searchArray) { 'use strict'; var stop = searchArray.length; var last, p = 0, delta = 0; do { last = p; if (searchArray[p] > searchElement) { stop = p + 1; p -= delta; } else if (searchArray[p] === searchElement) { // FOUND A MATCH! return p; } delta = Math.floor((stop - p) / 2); p += delta; //if delta = 0, p is not modified and loop exits }while (last !== p); return -1; //nothing found }; Do you know binary search algorithm at all?! The first checked element should in the middle of sorted array. Exactly at index=length/2.. Then why on the Earth p=delta=0?! if (searchArray[0] > searchElement) { is checking the first element in array, not the one that's in the middle of array.. I would suggest to put there printf() which will report which element is checked at which iteration, then f.e. if length = 100 it should be 50, then 25/75 then 12.5/37.5 or 62.5/87.5 and so on, so on, until finding the right entry.. p = length /2; delta = length /4 at init, then in the middle of loop p += delta or p-= delta; depending on element greater than, or smaller than, then delta /= 2;
  4. Learning history at too early stage of life (and often later, easily influencing people with weak minds) is used here to make nationalists (aka "patriots"). Children are learning about war crimes, mass massacres, made by grand-grand-parents of people from neighborhood countries and are learning to hate them. One intelligent children which will hear about war mass murders will want to never happen it again, the other one can seek for revenge (or at least to not trust foreigner), even if it happened 80 years ago, and the all people truly involved are long time dead. "Learning history" might be bad idea, when it's in wrong hands.. politicians who want to increase tensions between nations for their own purposes. Good idea would be to start everything from fresh white piece of paper, without all these past nightmare memories which are celebrated endlessly.
  5. I will extend previous reply from post #7. It's very often actually reverse. Photon that's absorbed by electron (which is part of atom) is "dying" (disappearing from system), and electron going to higher energy state. When electron is going back to ground state, it's emitting photon. It can take a while to do it. Such situation is called metastable state. https://en.wikipedia.org/wiki/Metastability Technetium-99m is widely used nuclear isomer, which is emitting gamma photons. https://en.wikipedia.org/wiki/Technetium-99m Nuclear isomer has the same quantity of protons and neutrons as ground state isotope (daughter isotope), but has different nuclear spin. When gamma photon is emitted by nucleus, nuclear spin is decreased by 1. Nuclear isomer has higher mass-energy than its daughter isotope.
  6. https://www.spacetelescope.org/images/opo1719b/ http://hubblesite.org/news_release/news/2017-19
  7. I gave examples of weak force/electroweak interactions. Read above links.
  8. There are also electron capture, beta decay minus, double beta decay minus, interaction with (anti)neutrinos (neutral current).. https://en.wikipedia.org/wiki/Weak_interaction https://en.wikipedia.org/wiki/Electroweak_interaction https://en.wikipedia.org/wiki/Neutral_current
  9. OP was asking about electrons, not photons.
  10. No. They don't die. They decelerate (lose their kinetic energy). Electron is destroyed in annihilation, together with positron.
  11. That's direct the case in photoelectric effect. In vacuum tube, you can accelerate electron to f.e. 1 keV kinetic energy, thus being able to have at max 1 keV photons, when you will provide 1000 Volts to electron gun electrodes..
  12. Charged particles that are decelerating, are emitting photons to conserve energy. f.e. in vacuum tube electron gun is emitting electrons, they are passing through hole in positive charged electrode, and flying through tube (their path can be controlled by external electric field or magnetic field (typically electromagnet)). They hit something which you will put there, f.e. piece of metal, and x-ray photons are emitted after collision. Maximum energy of photon emitted depends on kinetic energy of electron prior collision.
  13. They want to force election of parties which want to abandon the rest of Europe, split Europe, and destroy it from the inside. Because you're intellectual person. For non-intellectual voter, it would work exactly reverse.
  14. They are doing it to influence election..
  15. Even if equation is balanced on "paper", it does not mean such reaction will happen in reality..
  16. Not without using many rude words...
  17. In Standard Model quantized are charge and angular momentum, Baryon number, Lepton number, quark and anti-quark quantity.. That's why I didn't mention them in above post.
  18. How about (hypothetical): Quantization of mass Quantization of energy Quantization of time Quantization of velocity Quantization of acceleration/momentum
  19. He used (sort of) Planck constant in electro volts * seconds, and energy in electron volts. But multiplied them by 10^6. [math]E=\frac{h c}{\lambda} = \frac{4.135667*10^{-15} [eV*s] * 299792458 [\frac{m}{s}]}{\lambda [m]} = \frac{1.24*10^{-6}[eV*m]}{\lambda [m]}[/math] [math]7994850 [eV] = \frac{1.24*10^{-6} [eV*m]}{\lambda [m]}[/math] [math]\lambda [m]= \frac{1.24*10^{-6} [eV*m]}{7994850 [eV]} = 1.55*10^{-13} [m] = 0.155 [pm] = 155 [fm][/math] To induce decay of Flourine-19 there can be used much less energy. [math]^{19}_9F + 4.01374 MeV \rightarrow ^{15}_7N + ^4_2He[/math]
  20. Patent for "Liquid nitrogen emergency cooling system for nuclear power plants " https://www.google.com/patents/US20150380115 "A reactor cooling system for cooling a nuclear reactor using nitrogen comprising a refrigeration unit for cooling and compressing nitrogen gas into liquid nitrogen, a liquids storage tank to store liquid nitrogen, the tank in fluid communication with the refrigeration unit, a heat exchanger drop system in fluid communication with the liquids storage tank, adjacent to the nuclear reactor, wherein the nitrogen absorbs heat by becoming gaseous, a tank for receiving and holding nitrogen gas in fluid communication with the heat exchanger and in fluid communication with the refrigeration unit, and where the system is a closed-loop drop system."
  21. They are not pseudocode. But the real C/C++ working codes. Which row you are not sure? I will tell you what it does. I attached projects, that can be loaded in Visual Studio Express/Community, and compiled by yourself. Multiply.zip Divide.zip In Release folder there are ready compiled executables for 32 bit. Run them from command-line (cmd.exe) with two arguments, unsigned integers. To be able to calculate 1/x we would have to be working with real numbers, with floating point, isn't.. ? How do you want to implement 1/x for integers/unsigned integers, without having fractional part.. ? My algorithms are working with unsigned integers (and after small modifications could be used with signed integers). As we can see, in the worst scenario, multiplication of n-bits will have to execute n-times of bitwise AND operator, n-times addition, 2*n-times left-bit shift (arithmetic shift without carry) https://en.wikipedia.org/wiki/Bitwise_operation#Arithmetic_shift So 32 bit multiplied by 32 bit will need 32 times AND,32 times addition, 64 times left-bit shift. Result 64 bit long. 64 bit multiplied by 64 bit will need 64 times AND,64 times addition, 128 times left-bit shift. Result 128 bit long. Division of 64 bit by 32 bit will need in the worst scenario 64 left-bit shift operations, 32 right-bit shift operations, 64 additions (32 of them increment by 1) 64 subtractions (32 of them decrement by 1). (it could be slightly optimized with less operations needed, it was rough algorithm) Tell me how would you implement multiplication of unsigned integers, if you would have such task to do.
  22. Multiplication can be implemented as series of left-bit shift operations. #include <stdio.h> #include <stdlib.h> int main( int argc, int *argv[] ) { if( argc == 3 ) { int src1 = atoi( (const char *) argv[ 1 ] ); int src2 = atoi( (const char *) argv[ 2 ] ); int output = 0; for( int i = 0; i < 32; i++ ) { if( src1 & ( 1 << i ) ) { output += src2 << i; // add to final src2 * 2^i } } printf( "%d\n", output ); } return( 0 ); } When number of bits is constant, loop can be unrolled: #include <stdio.h> #include <stdlib.h> int main( int argc, int *argv[] ) { if( argc == 3 ) { int src1 = atoi( (const char *) argv[ 1 ] ); int src2 = atoi( (const char *) argv[ 2 ] ); int output = 0; if( src1 & 0x1 ) output += src2; if( src1 & 0x2 ) output += src2<<1; if( src1 & 0x4 ) output += src2<<2; if( src1 & 0x8 ) output += src2<<3; if( src1 & 0x10 ) output += src2<<4; if( src1 & 0x20 ) output += src2<<5; if( src1 & 0x40 ) output += src2<<6; if( src1 & 0x80 ) output += src2<<7; // ...repeat 32 times, or as many as is needed.... printf( "%d\n", output ); } return( 0 ); } CPU can have such unrolled loop implemented in hardware. ps. Please notice that src1*src2, will be executed in completely different time than src2*src1, even though result will be the same, if number of set bits is significantly higher. Division can be also implemented as series of bit-shift operations: #include <stdio.h> #include <stdlib.h> int main( int argc, int *argv[] ) { if( argc == 3 ) { int src1 = atoi( (const char *) argv[ 1 ] ); int src2 = atoi( (const char *) argv[ 2 ] ); int output = 0; printf( "%d / %d = %d\n", src1, src2, src1 / src2 ); if( src2 == 0 ) { // division by 0 } else if( src1 == src2 ) { output = 1; } else { int shifts = 0; while( src1 > src2 ) { src2 <<= 1; shifts++; } do { src2 >>= 1; shifts--; //printf( "Src1 %d Src2 %d Shifts %d\n", src1, src2, shifts ); if( src1 >= src2 ) { src1 -= src2; output += 1 << shifts; } } while( shifts > 0 ); } printf( "%d\n", output ); } return( 0 ); } ps2. Algorithms for unsigned integers.
  23. Googling for "notepad++ backup text files" gives plentiful of articles with people who experienced the same as you. Empty file https://stackoverflow.com/questions/24158616/lost-code-lines-when-notepad-crashed "I was working on a .js file this morning on Notepad++, as usual, when the program just crashed. So I ended it, and re-opened it to see that all my code lines in my .js file, had disappeared, and now all I have left is the file with a size of 0kb because there's nothing left in it. How the hell is that even possible ? It erased everything I typed and saved the file as if there's nothing in it." One of answers "When that option (automatic backuping) is enabled (and it is by default), Notepad++ keeps a backup copy of files you edit. You can find the backups in the directory %APPDATA%\Notepad++\backup under the format filename@datetime." Applications which have automatic backing up system, are typically implementing this feature as: - move/rename currently existing file to [backup folder]\new file name then - open file for writing, - write content - close file If crash will happen after moving/renaming, but before writing new file, this file literally does not existing, or exist only null/empty file. It has nothing to do with operating system you're using. It could be Linux or MacOS, with exactly the same result.
  24. Let's assume comet is sphere, and that density of water is equal to ice, for simplification. Volume of sphere is: [math]V = \frac{4}{3} \pi r^3[/math] r=15km = 15000m [math]V = \frac{4}{3} \pi 15000^3 = 1.414 * 10^{13} m^3[/math] Divide by area of Earth: r=6370 km = 6370000m [math]A = 4 \pi r^2[/math] 5.1*10^14 m^2 [math]1.414 * 10^{13} m^3 / 5.1*10^{14} m^2 = 0.028 m = 28 cm[/math] 30 km large ice comet would rise sea level only 28 cm.
  25. Yes. My app is showing 7.99485 MeV as well.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.