-
Posts
7925 -
Joined
-
Last visited
-
Days Won
26
Content Type
Profiles
Forums
Events
Everything posted by Sensei
-
Stopping of light passing through material would be pretty much equal to absorption of photons by that material (if we will assume energy-momentum conservation must hold in any case) So material would have to be made hotter, or chemical reaction would have to happen, or photon being transformed other way. We can observe very clearly such behavior in Coca-Cola, or a few days old beetroot's juice. Green laser 532 nm 100 mW fades away completely in Coca-Cola after 3-4 cm.
-
Nonsense. We have given to you alternative solutions. And you completely ignored them. You showed that discussion with you is waste of time, and pointless. Mine the biggest PHP project have 222 KB of pure PHP code (no comments). With the main index.php with size 177 KB (6000 rows of code). And there was just one <?php and beginning and one ?> and the end. Everything generated dynamically. No single reason to use such silly function as eval() I have found in mine entire life. In your example you should be echo-ing, or printf-ing from php code instead of constantly switching back and forth between php and html. What you earned on lack of echo "", you will lose on writing <?php and then ?> and code will look like a crap, unreadable. Other example. You can have f.e. function web_begin($params="") { ?> <html><head>...</head><body><div>.... <?php } function web_end() { ?> </div></body></html> <?php } or if some wants (like me): function web_begin($params="") { printf( "<html><head>...</head><body><div>...." ); } function web_end() { printf( "</div></body></html>" ); } (It doesn't matter how it's implemented (good old OOP black-boxing idea at work) ) Then call web_begin(); [...] web_end(); from one or multiple index.php, article.php etc. and changes to these two functions will have effect in entire website instantly. You don't have to worry how functions were implemented. The same with generation of common elements. Instead of repeating <h2>File Info</h2> multiple times, make function which is generating it. Then call just function. Then change to that function will have effect in entire website, without having to rewrite everything in multiple places! That's how most of people are making multi language websites on the world. Strings are loaded from external file (or php script with right suffix strings_en.php for English, strings_it.php for Italian etc), and found by their identifiers. So code would actually looks like f.e.: function file_info() { printf( "<h2>%s</h2>, $strings[ 'FileInfo' ] ); } What is source of definition that you are executing in eval()? Is it loaded from external file? Is it loaded from SQL database record? If it's hardcoded in script like in examples that you gave, there is no single good reason to use eval().. If you need to execute code that's unknown at building website stage you can create temp file. http://pl.php.net/manual/pl/function.tmpfile.php Then write php code there, loaded from HTML GET/POST. And from code execute require_once($tempfile); Then delete file. But such techniques are for home made websites for yourself. Hacker would immediately utilize it in public available website.
-
Do you have microwave oven? Do you have wattmeter? Similar to this one: You can make set of experiments by yourself. Measure water mass f.e. 100 grams. Measure temperature of water. Place in oven. Turn microwave for f.e. 10 seconds. Measure temperature of water again. Now you know delta temperature between start and end of experiment. We know that 1 calorie is energy needed to increase temperature of 1 gram of water for 1 C. 1 calorie = ~4.1855 J or so (not constant, depending on many variables) http://en.wikipedia.org/wiki/Calorie From wattmeter you know energy usually given in kWh so you need to convert to joules. So you can calculate total energy consumed by device, (including lost energy). According to wikipedia microwave oven can be up to 64% efficient. f.e. mass of water is 100 g, start temperature of water = 0 C, end temperature of water after some time will be 80 C there is needed approximately 100 g * 4.1855 * 80 = 33484 J of energy. With 1100 W microwave oven, with I= ~4.8 A and U=230 V, and efficiency 64% we should expect such temperature of 100 g of water after ~48 seconds (if glass/container won't absorb energy and there will be no further loses (hard to calculate in memory without performing experiment in real) ).
-
Mastercard and Visa shutdown their business in russia. http://rt.com/business/visa-mastercard-russia-sanctions-285/ http://en.ria.ru/business/20140321/188628529/Visa-Mastercard-Freeze-Customer-Cards-at-Russian-Bank.html If they would give 2 day delay to 0:00 Monday during weekend, it would end up in run on russian banks. While they would be closed for normal operation.
-
Wifi network around turned on microwave oven is stopping working or working significantly slower. On YouTube there are videos showing download speed with turned off and turned on oven. So at least some microwave photons get out of oven and are interrupting transfer. Wifi 2.4 GHz uses the same frequency range as customers ovens. I don't think so we can generalize efficiency. It's probably depending on manufacturer, used technologies etc. I don't expect much from no name, cheap stuff. Come to oven with laptop with f.e. http://www.speedtest.net running and you will see.
-
Breakage of energy conservation, momentum conservation, angular momentum, baryon number conservation, lepton number conservation, is not enough?
-
The possibility of immortality
Sensei replied to Marshalscienceguy's topic in Biochemistry and Molecular Biology
People would have to find a job they like.. -
I am really surprised by your statement.. Have not I showed in post #31 video where Russian soldiers took control over Crimean airport, and then Ukrainian soldiers, without weapons, tried to retrieve it back. And Russian soldiers started shooting to scary them.. ?
-
I have no idea why are you calling it "technology". It's simply structure of website. I am almost always having just one index.php that's redirecting body to other pages that have no common start and end. For example: [common header] if( isset( $_GET[ 'ID' ] ) && file_exists( $_GET[ 'ID' ] ) ) require_once( $_GET[ 'ID' ] ); [common footer] And then using URL rewriting: http://url/article/ -> ?ID=article.php http://url/support/ -> ?ID=support.php http://url/contact/ -> ?ID=contact.php What user sees in browser is on the left. He has no idea about "ID" code. If I want, I can use $id = $_GET[ 'ID' ]; if( $id == "stuff" ) { // do something here } else if( $id == "other" ) { // do something else } and have just one index.php with entire website. In any serious website, it would means not possible to proper search engine optimizations.
-
But efficiency is not good. 15% from 1050 W/m^2 is 157 W = 157 J/s. I am using a lot of energy (server is running 24h) in comparison to mine neighborhoods 2-3 times more. 417 J/s average = 10 kWh per day. There would be needed 3 m^2 of solar panels if Sun would shine all the time, the same strength. So actually we would have to double-triple if not more that area and somehow store energy to use at dark and night stage of day. Another lost of energy is having to convert low-DC low-voltage of solar panels to 230 V AC, then AC is converted to DC by all devices. Lost that could be fixed by making sockets with multiple AC/DC inputs and device would use DC if available without having to waste energy transforming it from AC->DC. But that would require redesigning the all devices.. Worldwide adaptation and willingness needed.
-
Better would be work on more effective solar panels, to have more than 15% from m^2. And install them everywhere possible as standard coverage of every house and building. But it's against gas&oil and energy industry interest. They need clients to give them money every month. Solar panel is sold once, and then client is gone.
-
Decimal system is just one of many (infinite in fact) systems. We choose it because we have 10 fingers. In binary system you have just 0 and 1.
-
Average lightning has 30,000 Amps for a very short period of time. Like 0.0005 seconds. 30,000 A * 0.0005 s = 15 Coulombs. (because Q=I*t) So in reality it's just 15*6.25*10^18 electrons = 9.375*10^19 electrons (the same charge as in I=15 A steady current) But of course electrons with high kinetic energy, 500 MJ. You can't compare it with current in socket, which is steady slow stream of electrons spread over time. Ampere is not unit of energy.
-
Did not I mentioned different total energy equation already.. ?
-
can someone please help me with this simple c program
Sensei replied to darrellclrk15's topic in Computer Science
CPU stack created by CreateThread() has default size of 1 MB of memory. http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx when 2nd parameter dwStackSize is 0 function is using default thread size. http://msdn.microsoft.com/en-us/library/windows/desktop/ms686774%28v=vs.85%29.aspx CPU stack created by CreateProcess() or other function might have different size, but there is limit. After exceeding limit, there will be overflow. Whenever function calls other functions return address is stored on stack, and all registers that might be used are stored as well, utilizing stack. So new function can use these CPU registers for its own purpose. I have modified code to: #include <stdio.h> void crash( unsigned long long depth ) { if( !( depth % 1000 ) ) printf( "Current depth %d\n", (int) depth ); crash( depth + 1 ); if( !( depth % 1000 ) ) printf( "Current depth %d\n", (int) depth ); // this line is never executed, but compiler doesn't know about it.. } int main( void ) { crash( 0 ); return( 0 ); } Make project in Visual C++ 2008 or so, compile in Release mode, and you will see. On Windows XP it's showing output: Current depth 0 Current depth 1000 Current depth 2000 Current depth 3000 Current depth 4000 Current depth 5000 Current depth 6000 Current depth 7000 Current depth 8000 Current depth 9000 Current depth 10000 Current depth 11000 Current depth 12000 Current depth 13000 Current depth 14000 Current depth 15000 Current depth 16000 Current depth 17000 Current depth 18000 Current depth 19000 Current depth 20000 Current depth 21000 Current depth 22000 Current depth 23000 Current depth 24000 Current depth 25000 (exactly 25715) And then closes automatically. Which is typical stack overflow behavior of Windows OS. Yes, of course. Nobody here were talking about creating new threads. Recursion is not doing so. In Windows the main application thread is created by CreateProcess(), and its stack size is as big as calling function wanted, or default. -
Your the main problem is lack of physical memory. 1 GB or even 2 GB is now absolute minimum. Otherwise system has to back and forth swapping memory to disk and vice versa because of lack of data in right moment. I am not using ad blockers. Instead I am disabling all flash in whole system by replacing DLL by empty one. Browsers can't load it. It can't auto update and none flash website is working. When I want flash (YouTube/Vimeo), I am using Chrome which has separate flash module.
-
Not "light is constant" but "light speed is constant" to the all observers. But frequency and wavelength is not constant. Haven't you heard about Relativistic Doppler Effect? http://en.wikipedia.org/wiki/Relativistic_Doppler_effect Frequency that for observer with v=0 has f0 to observer with v=0.5c will be f=f0*sqrt((1+0.5)/(1-0.5))=f0*sqrt(3)=f0*1.732 (if they are approaching each other) It's blueshift http://en.wikipedia.org/wiki/Blueshift Reverse of this process if redshift http://en.wikipedia.org/wiki/Redshift
-
can someone please help me with this simple c program
Sensei replied to darrellclrk15's topic in Computer Science
Compile and run it. That should be whole answer to question.. When stack will be full, it should crash program. -
You don't have needed experience to judge whether it's "great paper" or "piece of garbage"..
-
That must be your document. You're defending it like you would write it..
-
Scientists in CERN, or in other particle accelerators, are calculating what velocity is needed to create certain leptons, mesons, or baryons, accelerating protons (or other charged particles) and getting predictable (more or less) results. If results are stable particles as for example antiprotons, they can be stored in magnetic traps etc, and used in other experiments. If equation would be significantly wrong, as suggested in above paper 25% of our value, scientists wouldn't create new particles with exactly predicted mass and energy, would they? ps. There was 0.994c not 0.94c. That little difference means 312% difference in energy.
-
can someone please help me with this simple c program
Sensei replied to darrellclrk15's topic in Computer Science
Do you know what recursion means? Because it's easy task.. Call the same function over and over again.. f.e. void crash( int depth ) { printf( "Current depth %d\n", depth ); crash( depth + 1 ); }