Everything posted by Sensei
-
Idling on the internet...
@Externet What guy described in the thread sounds like memory leakage.. One can make bug (intentionally if it is hacker attack, or most likely unintentionally) in JavaScript code that any web browser will suffer the same.. Closing page and/or web browser will help. Write bash scrip which checks firefox process memory usage and warns after exceeding some limit..
-
Idling on the internet...
If you know the hostname of the ad server (this can be checked with e.g. Wireshark, or web browser developer tools), you can edit the hosts file (in Windows in %WinDir%\System32\Drivers\Etc ) and add a fake entry that will point to e.g. localhost, which will fool the DNS routines and the web browser.. it will try to load a different page than it should and fail.. (such a handmade ad-blocker that works with any OS).
-
Idling on the internet...
Identify that it is a web-browser at all by shutting down web-browser. If it is indeed a web-browser, majority of websites these days use AJAX (Asynchronous Javascript and XML) https://en.wikipedia.org/wiki/Ajax_(programming) i.e. when you load website, it starts Javascript program, which can run in the background, and reloads parts or all of the website, typically to reload ads after a while, so user see new content.. Ads in these days are MP4 x264 videos, so they are heavy data, either for Internet connection (precious, if you're on metered limited like 2G/3G/LTE/5G) and for CPU/GPU (if I am making Hotspot from my smartphone (metered LTE), and share it with Windows/PC, and leave it all day long, it can download 0.5-1 GB of trash) AJAX is used whenever parallel reload of website is required i.e. Google Maps use it to load map when you drag mouse pointer.. FB/Instagram/GMail use it when you use mouse wheel, to load off-screen elements. Identify that it is a web-browser at all by shutting down web-browser. Cookies have nothing to do with it. They are information sent by website to user-client web-browser, and user-client web-browser sends them back to website, when user visits the same website again (or they can go with AJAX request) Use Wireshark to identify what information is being sent by applications or OS. https://www.google.com/search?q=Wireshark Whoever ordered the ad does not know it, does not see it. The client of the advertising company receives information about how many people have viewed and/or clicked on the ad. Such an "invisible ad" adds to the un-clicked one, giving the impression that someone viewed it anyway..
-
It's my duty to battle the Left (split from War Games: Russia Takes Ukraine, China Takes Taiwan. US Response?}
Hilariously, you use words whose meaning you don't know.. https://en.wikipedia.org/wiki/Left-wing_politics "Today, ideologies such as social liberalism are considered to be centre-left, while the Left is typically reserved for anti-capitalist movements, namely socialism,[8] including anarchism, communism, the labour movement, Marxism, social democracy and syndicalism" ..and in another thread, you seemed to like the idea of (communist, i.e. far-left) China annexing/attacking (republican) China (aka "Taiwan").. If you fight with the Left, as you claim, or believe in so, you should rather support non-communistic (i.e. not far-Left) Taiwan..
-
War Games: Russia Takes Ukraine, China Takes Taiwan. US Response?
I suggest learning more about the history.. "The official name of the country (Taiwan) in English is the "Republic of China" (ROC); it has also been known under various names throughout its existence. Shortly after the ROC's establishment in 1912, while it was still located on the Chinese mainland," "During the 1950s and 1960s, after the ROC government had withdrawn to Taiwan upon losing the Chinese Civil War, it was commonly referred to as "Nationalist China" (or "Free China") to differentiate it from "Communist China" (or "Red China")." "The Republic of China, which had overthrown the Qing in 1911, took control of Taiwan on behalf of the Allies of World War II following the surrender of Japan in 1945. The resumption of the Chinese Civil War resulted in the ROC's loss of mainland China to forces of the Chinese Communist Party (CCP) and consequent retreat to Taiwan in 1949. Its effective jurisdiction has since been limited to Taiwan and smaller islands. " https://en.wikipedia.org/wiki/Taiwan "The Communists gained control of mainland China and established the People's Republic of China (PRC) in 1949, forcing the leadership of the Republic of China to retreat to the island of Taiwan.[9] Starting in the 1950s, a lasting political and military standoff between the two sides of the Taiwan Strait has ensued, with the ROC in Taiwan and the PRC in mainland China both officially claiming to be the legitimate government of all China. After the Second Taiwan Strait Crisis, both tacitly ceased fire in 1979; however, no armistice or peace treaty has ever been signed.[10]" https://en.wikipedia.org/wiki/Chinese_Civil_War IOW, Chinese politicians (republicans) who overthrown monarchy (1911-12), established republic government in China (i.e. China mainland and Taiwan island).. Communist guerrillas overthrew them in mainland China ('50-'60), but republicans fled to the last place they had - the island of Taiwan, where they still reside today. Why do you gave more right for Chinese Communist Party, than to Republic of China party?
-
Did Apollo 11 land on the moon?
C'mon guys. We are on a scientific forum. If he has doubts about the photographs delivered by the Apollo 11 team, then you should ask him what is wrong with them.. analyze photo by photo, issue by issue.. Let's keep the discussion at a high level, not at the level of preschoolers in the sandbox who one shouts "yes", the other shouts "no", without any serious arguments.. Let's learn in detail about his arguments against the moon landing..
-
Floods and droughts
...I don't recall prays for highways, water collection, storage and distribution facilities.. at least not in enough amount, to take care of it.. Pray more the next time.. (..and I will tell you how to build super cool highway..) Happy mortal.. ?
-
Floods and droughts
IOW, people were twice time screwed/cheated.. but that was 20-25 years ago when they made tax for highways, so nobody remembers.. ...expect taxes for it.. ?
-
Floods and droughts
Politicians, in democratic countries, as long as they are sane, will only do what gets them elected in the next election (if they are not pushed by the influence of third countries, sponsors of the campaigns, secret services etc. ).. This is why it is so difficult to move away from the use of fossil fuels in countries or states where any mention of a "green revolution" triggers immediate opposition from people and their families who work in the industry.. Are not you, or US, in capitalistic country.. ? In such country, the only project which will be made are the one which earns money.. Highways that are paid for? Here there is a tax included in the price of fuel to cover the cost of building highways.. When they built them, after a dozen years or so, highways are not free.. You can have a cheaper airplane ticket to the other side of the country than paying all the highway bills trying to get there by car! Without the cost of fuel in the car included..
-
Hamburgers in one piece... [cooking]
It is also necessary to use a appropriate tool for flipping it. The wider the better. e.g. a fork is a bad idea... The same is true of European pancakes (they are 1-2 mm thick and 20-25 cm wide). Trying to use a fork (or too soon) to flip pancakes will end up ruining them. ps. Try squeezing bananas with a fork (sugar not needed, but cinnamon recommended) and use as a filling for European pancakes, then roll. Lovely taste.
-
Hamburgers in one piece... [cooking]
You need: ground meat, egg (yolk), bread crumbs, flour, onion, pepper, salt, garlic. Mix the yolk. Squeeze garlic. Cut the onion into tiny pieces (boxes) and lightly fry, not too much. When it is cold, mix with the rest of the ingredients. On top, in the last step, use flour as a covering. Some people put them in the refrigerator for a while. The pan (Teflon) must be well heated. Use a stopwatch on your smartphone, to count down 3-4 minutes for each side. Trying to change the side too soon may end up damaging it. Swap sides using a wooden spatula. It is very important to already bake one side of the ground schnitzel before trying to swap sides. How to chop an onion (properly): https://www.simplyrecipes.com/recipes/how_to_chop_an_onion/ or Gordon's way:
-
Echoes
1) subjective feeling 2) you are deaf 3) environment (reflected sound has too low volume toward you). eg. in an anechoic chamber, no echo can be heard https://en.wikipedia.org/wiki/Anechoic_chamber 4) interference with previous words Everything is an echo, your ear does not receive sound directly. The sound reverberates through it several times.
-
New Theory
[math]F=\frac{GMm}{r^2}[/math] What does it mean? The smaller the radius r of the object, the greater the force, on the surface... The "surface" of a neutron star, with a mass equal to or similar to the Earth, is much closer to the center. The same mass, packed with atoms or neutrons of much higher density, in a very small volume..
-
"Bootable" USB to hard drive cable...
..do you know that you can run a Virtual Machine e.g. VirtualBox, with Windows (any version), simulated.. ? Even a couple (if you have >>=16 GB ram especially), parallel.. https://www.virtualbox.org/ It doesn't cost anything. Other than a few GB of disk space. Win10 takes ~ 10 GB, Kali Linux takes ~ 11 GB. USB v3.0 is blue inside: https://www.google.com/search?q=blue+usb+3 (go to image mode) On Windows use Start > cmd, enter "dxdiag", it will tell what hardware do you have i.e. mobo model.. Search net for motherboard model + "specification" and it will tell how many USB ports do you have and in which versions.. some may be v2 and some v3.. v3 compatibility should be able to switch on/off in BIOS (Linuxes don't like v3, have been told, especially if you try to boot from such drive/pendrive.. driver problems etc.).
-
"Bootable" USB to hard drive cable...
Depends on USB. I am getting max. ~ 25 MB/s which is pretty slow for today standards.. (should be more, but pendrive does not let it go any faster) SSD should work 550 MB/s, and NVMe should be even 3500 MB/s with 25 MB/s it's ~ half of obsolete HDD performance.. (just copy one big multi-GB file, and you will see) Connecting to USB v3.0, in my case, made no difference in speed..
-
Final year project question. Music visualiser
If you like music, how about starting from visualization of staff.. ? Make generic C++/Java class Note with attribute taking enum { C, D, .... , H } as parameter, and second one integer with octave, and third one with length. e.g. new Note( Note.C, 5, Note.Half ) will be C-5 half-note.. methods: set/get C,D... H (from enum) set/get octave integer.. set/get length (whole note, half note, etc.) (from enum) set/get frequency (convert human readable e.g. C-5 to corresponding the real frequency https://www.google.com/search?q=notes+frequencies ) helper public static function Parse( std::string &string ); generating Note object from given string. Then make class which has dynamic list of such notes (Staff class). (template class? List<Note> / ArrayList<Note> in Java?) Then make class which is taking Staff object as argument and outputs PNG image. Draw 5 horizontal lines with user defined space between them, and then iterate through the all elements in the staff object, and for each note object, draw it, with appropriate shape and horizontal position (index in staff) and vertical position (octave and note), with appropriate design (load PNG with predefined templates or generate them by yourself using drawing functions?). Make parameters fully controllable by the user. Sizes, spaces, distances, thicknesses etc. Then you can take staff as argument in command-line like in Linux pipe: echo "C-5, D-5, E-5" | genstaff image.png Then you can make website, on your dedicated server, where from e.g. PHP/CGI code you can execute bash script/command-line, taking HTML form input with notes, which will generate PNG and show staff to the website client.. It should not take you more than a just a few hours for all this project. Teacher (or other students) will be able to visit your website, enter notes in text input field in HTML form and instantly see generated staff (use AJAX/jQuery to parse HTML form and call genstaff command, and send to web-browser client to see result), so user has not have to click any button, but see result instantly.. Fun project. A joint-venture of several technologies C/C++/Java/HTML/CSS/AJAX/jQuery/PHP.. Sounds it would require FT/FFT https://en.wikipedia.org/wiki/Fourier_transform Boring.. (IMHO) ...unless you make a website (Android/iOS app?) that uses a microphone to capture sound from the user's room and then analyzes it in real time visualizing something.. If you do the first (on the top) project with FT/FFT, you can generate staff with notes automatically from the given music (recorded by microphone?) example.... and show it to the user.. a multi-million dollar website if you achieve this.. Can be done this week..
-
HTML
Not really.. Python can be created in any text file and/or generated on demand by other script or application.. e.g. echo >script.py "python script content" then execute it.. Any programming language code can be written in any text editor (as long as you don't start using UTF-8/Unicode, some text editors don't support Unicode, which will result in damage of the code) The code is written in text file format (exceptions can be counted on one lumberjack hand, e.g. Amiga Amos https://en.wikipedia.org/wiki/AMOS_(programming_language) ) It could be, but it is not really webmaster friendly editor. Try mousepad on Linux, or ConTEXT/NotePad+ on Windows. Terminal/shell can be "HTML editor" too.. you just do: echo >index.html "<html>.....</html>" Not really. HTML is Hyper Text Markup Language, which has nothing to do with programming languages, apart of suffix in the name. It's just a way to encode tags. HTML can be interpreted only by web-browser. Python is a way more robust and general purpose language..
-
Solar Powered Hydrogen Engine
The amount of energy flux in this small hot area less than the energy flux intercepted by the lens of the magnifying glass. ..because part of the photon energy is reflected and part is absorbed by the glass.. This statement could be true if there were 100% efficiency..
-
What is the difference between activity and event in "simulation"?
Is this a computer science question? If yes, in object-orientated programming languages, "customer", "message" will be object of class which you will create for them. Change of attribute can trigger event. The activity will be a method of the class that will do something to the object, change attributes and possibly trigger some events. Events and event-handlers are used to let an unknown class/object learn about changes made to an object. See how this is implemented in Java: https://docs.oracle.com/javase/7/docs/api/java/beans/EventHandler.html https://docs.oracle.com/javase/tutorial/uiswing/events/intro.html Event object contains detailful information about the event. e.g. event with information about mouse click will have x and y position of mouse where click occurred and which mouse buttons were clicked or released. For GUI window, attribute will be opened=false or opened=true, with activity-method open()/close(), with events: opening, opened, closing, closed. User (some class e.g. button, listview, application etc.) of window will add event-handler listening for arriving opened event, or closed event, and do something with this information.
-
War Games: Russia Takes Ukraine, China Takes Taiwan. US Response?
You don't seem to understand/know/taking into account true reasons for NATO and EU interventions.. i.e. massacres, mass executions, war crimes, concentration camps.. https://en.wikipedia.org/wiki/Serbia_in_the_Yugoslav_Wars#War_crimes https://en.wikipedia.org/wiki/Omarska_camp https://en.wikipedia.org/wiki/Prijedor_ethnic_cleansing In early '90: https://en.wikipedia.org/wiki/Bosnian_War in late '90: https://en.wikipedia.org/wiki/Kosovo_War https://en.wikipedia.org/wiki/NATO_bombing_of_Yugoslavia
-
War Games: Russia Takes Ukraine, China Takes Taiwan. US Response?
The actions of the V.P., and historical data to date, indicate that the russkies, after capturing a region, annihilate, mass murder all opposition and intelligence, in the region, in order to have "peace and quiet", just slaves obedient to their rules.. slaves like their own citizens.. Why do you think they put eastern and southern Ukrainians (from occupied regions) in "filtration camps" and send others to the far eastern regions of Siberia and Asia.... ? https://en.wikipedia.org/wiki/Russian_filtration_camps Millions of Ukrainians have "disappeared".. I am surprised Ukrainians didn't destroy bridges on Dnieper to Kherson.. if/when V.P. forces will be forced to escape Kherson, they will certainly destroy them anyway.. so, better take them into blockade, when there is time for it, than give them route of escape to other side of the river.. (Dnieper is ~ 500m wide in that area) The more V.P. units captured in Kherson, the better (for Ukrainians).. Ukrainian forces must be well prepared to cross the Dnieper River without any bridge.. or southern Ukraine is lost..
-
No material can have a net negative charge. [Answered: Wrong!]
...if you make positive ions, you also have to make negative ions.. electrons don't disappear.. they are intercepted by some other atoms.. e.g. 2Na + Cl2 -> 2 ( Na+ + Cl- ) Neutral Sodium has 11 protons and 11 electrons, Qna=0e Neutral Chlorine has 17 protons and 17 electrons, Qcl=0e Sodium gives electron to Chlorine, Positive ion of Sodium has 11 protons and 10 electrons, Qna=+1e , because +11e-10e=+1e Negative ion of Chlorine has 17 protons and 18 electrons, Qcl=-1e , because +17e-18e=-1e Overall Q= Qna + Qcl = 0e all the time (conservation of charge).
-
No material can have a net negative charge. [Answered: Wrong!]
Actually, the photo is of a bubble chamber with a relatively dense medium - liquid hydrogen. In newer LHC detectors: https://www.lhc-closer.es/taking_a_closer_look_at_lhc/1.detectors "Charged particles – electrons, protons and muons – leave traces through ionisation. Electrons are very light and therefore lose their energy quickly, while protons penetrate further through the layers of the detector. Photons themselves leave no trace, but in the calorimeters, each photon converts into one electron and one positron, the energies of which are then measured. The (kinetic) energy of neutrons is measured indirectly: neutrons transfer their (kinetic) energy to protons, and these protons are then detected. Muons are the only particles that reach (and are detected by) the outermost layers of the detector."
-
No material can have a net negative charge. [Answered: Wrong!]
It had the same number of protons as electrons, so it was neutral. When an electron is ejected, the neutral atom or molecule loses an electron, so it now has more positive charge. After capturing an electron, the neutral atom or molecule gains an electron, so it now has more negative charge. Isn't that obvious? Electrically charged particles, atoms (ions), or molecules, are easily detectable and observable by naked eye.. They reacts to external electric fields, and external magnetic fields.. Unlike neutral particles, neutral atoms, and neutral molecules, which do not react.. Visible in e.g. cloud chamber, Millikan oil drop experiment: (Neutral particles are straight lines, circles to the left and right, are charged particles and their opposites) https://en.wikipedia.org/wiki/Oil_drop_experiment
-
No material can have a net negative charge. [Answered: Wrong!]
If you have a neutral metal and emit photons of sufficient energy into it ( photoelectric effect ), the electrons will be ejected from it.. they don't disappear, do they? So where do they end up? On another material, of course, making it negatively charged.. So your statement is easy to dispute.. ...after a while, or not, positively charged atoms or molecules, intercept electrons from surrounding environment, making it one again, neutral..