 # Sensei

Senior Members

5924

13

## Everything posted by Sensei

1. What is composition of bit? (in computer sense) We know that it can have value 0 or 1 (kinda like property of bit), and we know its address (kinda like position of bit). We can read bit, write bit, compare two bits, store it on disk, restore, group them to byte (8 bits), short (16 bits), long (32 bits) etc.etc. I am not saying that Universe is some kind of database or so. Universe is "alive". Particles interact constantly. But as you can see in above example, not everything has to be made of infinitely smaller things. Bit is unbreakable. It's fundamental.
2. A. Erwin Schrödinger B. Marie Skłodowska-Curie
3. The best is to see it on your own eyes. If you will place magnet/electromagnet in Cloud Chamber and send beam of particles, or from radioactive decay, you will see how they behave in magnetic field based on their charge, mass, and momentum. Building your own Cloud Chamber costs $20. Just find steady source of dry ice in your area. 4. No,no,no... In Coulombs Law you don't have flowing charged particles (so you can't say "charges per second"). They are stationary. Motionless. At least during verification of law we're not using moving charges. When Coulomb created his theory, batteries didn't exist yet. http://en.wikipedia.org/wiki/Charles-Augustin_de_Coulomb http://en.wikipedia.org/wiki/Alessandro_Volta Distance between leafs in electroscope device is changing the more it's "charged". Leafs are further each other the more electrons gathered on them. Distance between leafs = r in equation. Q symbol is used to denote charge not C. C is unit. http://en.wikipedia.org/wiki/Electric_charge Are you reading the all articles that are posted here? "charges per second" has sense in electrical circuits, when electrons from one side (negative - electrode) of battery flows to other side (positive + electrode). 5. ?? If you have number f.e. 1000 you can write it also using scientific notation 1e+3 or 1e3 (+ is default) Other example: 1.23e-2 = 0.0123 = 1.23*10^-2 After exponent symbol you don't/shouldn't have power ^ symbol. Read this http://en.wikipedia.org/wiki/Scientific_notation In many physical equations f.e. radioactive decay with mean-life instead of half-life there is used e mathematical constant http://en.wikipedia.org/wiki/E_%28mathematical_constant%29 Don't confuse these two things! When I have to quickly enter very small number to calculator often I am dividing by large positive number, f.e. I want to enter 1.602e-19. I am entering 1.602, hitting divide, and entering 1e19, and calculator is showing 1.602e-19. You can also enter 1.602, press EXP, then +/-, then 19, and calculator will show 1.602e-19. But much easier is doing calculations in f.e. OpenOffice SpreadSheet or Excel. 6. You're mixing everything.. Electron has charge -1.602*10^-19 C (Coulombs) It's elementary charge http://en.wikipedia.org/wiki/Elementary_charge If we have 6.24*10^18 electrons, we have: Q=-1.602*10^-19 C * 6.24*10^18 = -1 C (1 Coulomb charge) I=Q/t Current in Amperes is Charge divided by time. For t=1 second I=1 C/1s=1 A If ampere meter is connected to circuit and is showing 1 A, you know that it's 6.24*10^18 electrons flowing through wire per 1 second. Battery that has 1400 mAh (typical NiMH AA for digital camera) has 1.4 * 3600 = 5040 C. So it's 5040 * 6.24*10^18 = 3.14496*10^22 electrons total. Knowing how many electrons has battery, and knowing how many electrons is used per second, you can calculate time battery will be working in seconds. With I=1 A, such battery will be working for 5040 seconds. With I=0.5 A, such battery will be working for 10080 seconds. etc. etc. How charge -+1.602*10^-19 C has been calculated? In oil drop experiment. http://en.wikipedia.org/wiki/Oil_drop_experiment Coulomb's Law is for stationary charges that gathered on body like previously mentioned by me electroscope leafs. It costs 20-30 usd. On ebay there is a few. Anybody can build it in a few minutes using jar and aluminum foil. Buy it or build it, and you will see how it works in practice and about what we're talking. 7. Suppose so you have array of strings, and have to find string with exact name. The basic logical way of solving it is to go through all entries of array and compare. Working but slow. const char *string; // argument const char *entries[]; // array int length; for( int i = 0; i < length; i++ ) { if( !strcmp( entries[ i ], string ) return( i ); // string found, return index } return( -1 ); // string not found, return invalid index -1 For 1000 entries, it will have to compare 1000 strings (at worse case). For 1 mln entries, it will have to compare 1 mln strings (at worse case). There are algorithms that can speed up this process. For instance, you can sort array in alphabetical order. Then compare middle entry with what we are searching for. int tmp = strcmp( entries[ length / 2 ], string ); if( tmp == 0 ) // string found, else if( tmp > 0 ) // string must be in one part of array else if( tmp < 0 ) // string must be in other part of array Now you see, one compare function used, and we have just reduced quantity of entries to compare to half of initial. If initial length of array is 1000 and we will be using such algorithm recursively we will have quantity of elements to check: 1000 500 250 125 62 31 15 7 3 1 Just 10 compare functions to find string in 1000 elements array, instead of 1000 in previous brute force algorithm. Where would you learn about such algorithm if not on lesson about algorithms? 8. No. That depends on whether it would help to survive. In hot environment & food shortage environment it's favorable to be small. In cold environment & food shortage environment it's favorable to have a lot of fat and fur. etc. etc. Adaptation depends on environment. 9. If we have molecule of water H2O at altitude 0, sea level, we need to give it energy to rise it to 1m, and even more energy to turn it to vapor and reach cloud altitude. If this molecule lose its kinetic energy (f.e. give it to N2 or O2), it will turn back to fluid state and will have to fall down to the ground of Earth. Airplane, satellite, rocket or anything flying must to not lose its kinetic energy to not fall down. In high energy physics, in particle accelerators, kinetic energy of particles accelerated to nearly speed of light are turned in collision to another proton and antiproton pair I don't know about you, but for me it's enough proof that it's real thing. Is kinetic energy the real thing? For somebody touching water with 0 C, and later water with 100 C, or touching metal at 0 C then 100 C, he can really see & fell difference. N2 molecule has 4.65*10^-26 kg, so kinetic energy with v=340 m/s is just 2.69*10^-21 J (predicted change in mass of molecule 2.99*10^-38 kg) O2 molecule has 5.3137*10^-26 kg, so kinetic energy with v=340 m/s is just 3.07*10^-21 J (predicted change in mass of molecule 3.417*10^-38 kg) 10. There is physical limit how tall can be grass. That depends on internal structure of vegetable (or animal) and environment they live in. During evolution organism tries to adopt and overcome limit (if it's a way to survive). Growing quickly tall means receiving more light from the Sun *) There was time in Paleozoic when air had a lot of oxygen (~double current value), and organisms that were absorbing oxygen whole skin area were much much bigger than now. After decrease of oxygen percentage, invertebrate can't grow too big. *) in mine neighborhood last year there was cut two trees (they had 20+ meters and 50+ years old) There was leaved roots in the ground. A week later from roots grow up couple new trees and reached nearly 2 meters. In just a week. 11. Maize corn, wheat, barley, rice, rye are all examples of grasses. 12. Deep sea microorganisms never saw Sun or light. They are utilizing heat coming from Volcano, and natural heat of Earth. 13. Image is named "SlowWormSkin_DominicGreves.jpg" 14. If your ruler is metallic, when we will be measuring distance at -100 C, 0 C, +100 C, +1000 C its length will be different, as metal shrinks and extends depending on temperature of environment. This effect is used in typical Mercury thermometer. 15. Somebody ideate a number. Other players have to find out what is this number. Player post his number and original author can answer only "higher", "lower" or "equal" - game is done and we know winner. To not cheat original author has to make photo of his number with monitor in background open with SFN thread visible so we can verify date. If allowed number is between 0...1000 number should be found after just 9-10 answers, if you know proper algorithm how to play it 16. ## Which is better Python or java? For network programming, security and over all. It's not the speed like you think.. If you receive or send one huge packet of data, most of cpu time is spend not in Python, but in operating system. In Counter-Strike: Source each player is receiving maybe something like 5-6 kb of data per second. So when 40 players play a game, server has to send 200-240 kb of data per second (and receive 40 kb from players). I think so it's compressed data, not raw. So server has to compress it and decompress (perhaps even 8000 times per second). Because there is really a lot to send *) But it's not 200 kb of data in one packet! It's more likely 2000-4000 packets with 50-100 bytes each. With steady delays between them, like 10-20 miliseconds. It's not one thread receiving data, but more likely 40 threads, each one waiting for data from just single player. If it would be one thread, processing data of one player would influence receiving data from other players when client would send them in wrong moment while server is busy processing other player data. We don't know details chosen by game developer to discuss it with detail. For example who calculates collisions: server or client? If client does it, then if some of them won't receive packet (lost packet) he will be alife, while other player will see him dead (?!) so it's strong argument for calculating this stuff on server side, and just broadcast info about death to clients (dead body remain in place, so it's broadcast even when it's not longer playing). The more will be done on client side of game, the more likely somebody will make cheat utilizing it. If client has to calculate final position of player after movement, cheat can change position of player twice as fast as usual f.e. or walking through walls (no collision checking), or flying (no gravity calculations). *) for instance some player is throwing away weapon, it's flying in air, all other 40 players can see this weapon in air flying, and they can catch it while it's in air.. Otherwise it'll land on the ground, or reflect from walls or other people, and stay there for future.. Player can buy as much weapons as he/she wants (up to default money 16 k$) and throw it away. So if every player will do it, for all 16k$, with 1k$ price of each weapon, we will end up with something like 640 weapon items laying on the ground in whole playfield.. And there are other items like grenades that can be laying on the ground as well.
18. And we can see traces leaved by them in Cloud Chamber. Long thin traces are from beta particles (electron or positron). Short thick traces are from alpha particles. The more kinetic energy has particle, the longer trace.
19. No. Just electron. Aluminum atom has 49218 times more mass than electron. Copper atom has 117667 times more mass than electron. Gold atom has 359109 times more mass than electron. When electron flows through conductor it sometimes hits atom, losing a bit of its kinetic energy, and heating atom, which is receiving electron's kinetic energy. The less this happens (lower resistance), the better conductor. If we have atom which lacks electron (ion+), and atom which has more electrons (ion-), the one that has more can give electron to the one which lack it. In batteries that have 1400 mAh on negative electrode we have 5000 Coulombs = 5000*6.24*10^18 = 3.12*10^22 electrons, and on positive electrode there are positive ions in the same quantity, which lacks electrons. After closing circuit electrons flow from negative electrode to positive electrode. Positive ions are attracting electrons. Each electron will have kinetic energy that corresponds to voltage difference. f.e. if voltage is 1 V, single electron will have 1 eV kinetic energy (electron volt unit). if voltage is 3.5 V, electron will have 3.5 eV kinetic energy. E=h*c/wavelength so wavelength = h*c/E = 4.135667*10^-15 * 299792458 / 3.5 = 354 nm UV LED have voltage drop 3.2-3.5 V (a bit is probably lost). So they emit photons with energies 3.2-3.5 eV, which correspond to wavelengths 387 nm .. 354 nm. Photon in ultraviolet spectrum. Where did you get such conclusions? I said "If you have single electron, charge Q will be -1.602*10^-19 C. If you have single proton, charge Q will be +1.602*10^-19 C." One has positive, other negative.
20. ## Help my understand why my cell phone charger current quantification failed!

2.1 A * 3600s = 7560 C. 7560 C / 2.1 C/s = 3600 s = 1 hour to charge to full with 2.1 A current. Is it plausible estimated time (assuming you don't play game at the same time ) ? Amper hour unit Ah is simply 3600 Coulombs. 1 Coulomb is 6.24*10^18 electrons. That's no surprise. After all it's more electrons per second. 1 A is 6.24*10^18 electrons, 2.1 A is 1.31*10^19 electrons per second. Apparently these games are using more energy than charger is able to provide. I guess so, heavy 3d. Do you have app showing cpu/gpu percentage usage with history.. ? Perhaps some application running all the time in background that's eating energy? Also loading a lot data to memory might have such effect. Typical computer random access memory must be refreshed periodically by current to sustain content. I had one Nokia 10 years ago that ate power like crazy when it was full of data. After deleting everything it could work several times longer. Current ebook technology is using screens that use power only while changing display. Games changes display even 30 FPS. Not sure whether such screens are used by some mobile phone. Might be highly model dependent.
21. Q in Coulombs [C] is charge. It's kinda like quantity of particles. 1 C = 6.24*10^18 electrons. If you have single electron, charge Q will be -1.602*10^-19 C. If you have single proton, charge Q will be +1.602*10^-19 C. Electrons and electrons repel. Protons and protons repel. Electrons and protons attract. So, if you have Q1=-1 C and Q2=-1 C, after multiplication negative by negative, we will receive positive value. F=k*-1 C * -1 C / r^2 = k*1*1/r^2 If Q1=+1 C and Q2=+1 C F=k*1*1/r^2 effect will be the same. You can see how it works using electroscope. http://en.wikipedia.org/wiki/Electroscope "leafs" are free to move. The higher quantity of electrons will gather on them, the further leafs will be from each other.
22. ## Help my understand why my cell phone charger current quantification failed!

Imagine you have discharged cell phone battery to null. How long it takes you to charge it to 100% full again? If your cell phone battery has 1000 mAh, and loading current would be 2.1 A, it would charge to full in just 500 seconds = 8 min 20 sec (let's assume no loses). With 0.2 A, it would be 80 mins+. Mine cell phone battery has 3.7 V and 3.7 Wh on its back. Which is 1000 mAh. How could you do it? Typical voltage meter has as largest resistance as possible, usually a few mega ohms AFAIK. And ampere meter has the smallest resistance as possible. http://www.allaboutcircuits.com/vol_1/chpt_8/5.html
24. I plugged DC motor (from old cassette Walkman or so) to 5.5 V 4 AA batteries that I had at hand. Without anything Ampere meter is showing 2.4 A. With DC motor Ampere meter is showing 0.210 A, voltage drop on DC motor is 1.5 V (4 V remaining). With DC motor and 210 ohm resistor, 0 A, and motor doesn't want to run. With DC motor and 4.3 ohm resistor, 0.19 A, voltage drop 1.5 V. Motor runs but slightly slower than without resistor.
25. log10 ( 10 ) = 1, because 10^1=10 log10 ( 100 ) = 2, because 10^2=100 log10 ( 1000 ) = 3, because 10^3=1000 etc. log2 ( 2 ) = 1, because 2^1=2 log2 ( 16 ) = 4, because 2^4=16 log2 ( 256 ) = 8, because 2^8=256 etc. Common bases: ln(x) = loge(x), base is e log(x) = log10(x), base is 10 In your example, if base is 5, then log5(125)=3
×