Jump to content

Sensei

Senior Members
  • Posts

    7940
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Sensei

  1. Wristwatches with luminous arrows are using radioactive Tritium. https://en.wikipedia.org/wiki/Tritium_radioluminescence
  2. Evaporate excess of water..
  3. There are two mirror answers of 3025: /* * PuzzleTest v1.0 (c) 2019 created by Sensei. */ #include <stdio.h> void decode( int index, int data[ 3 ][ 3 ] ) { for( int i = 0; i < 9; i++ ) { int value = index % 10; data[ i / 3 ][ i % 3 ] = value; index /= 10; } } bool has_zeroes( const int data[ 3 ][ 3 ] ) { for( int j = 0; j < 3; j++ ) { for( int i = 0; i < 3; i++ ) { if( data[ j ][ i ] <= 0 ) return( true ); } } return( false ); } bool has_duplicates( const int data[ 3 ][ 3 ] ) { bool result = false; int digits[ 10 ] = { 0 }; for( int j = 0; j < 3; j++ ) { for( int i = 0; i < 3; i++ ) { int value = data[ j ][ i ]; if( digits[ value ] != false ) return( true ); digits[ value ] = true; } } return( false ); } int calc_score_column( const int data[ 3 ][ 3 ], int column ) { return( data[ 0 ][ column ] * 100 + data[ 1 ][ column ] * 10 + data[ 2 ][ column ] ); } int calc_score_column_product( const int data[ 3 ][ 3 ], int column ) { return( data[ 0 ][ column ] * data[ 1 ][ column ] * data[ 2 ][ column ] ); } int calc_score_row( const int data[ 3 ][ 3 ], int row ) { return( data[ row ][ 0 ] * 100 + data[ row ][ 1 ] * 10 + data[ row ][ 2 ] ); } int calc_score_row_product( const int data[ 3 ][ 3 ], int row ) { return( data[ row ][ 0 ] * data[ row ][ 1 ] * data[ row ][ 2 ] ); } int calc_score( const int data[ 3 ][ 3 ] ) { int score = 0; for( int i = 0; i < 3; i++ ) { score += calc_score_column( data, i ); score -= calc_score_column_product( data, i ); score += calc_score_row( data, i ); score -= calc_score_row_product( data, i ); } score -= data[ 0 ][ 0 ] * data[ 1 ][ 1 ] * data[ 2 ][ 2 ]; score -= data[ 0 ][ 2 ] * data[ 1 ][ 1 ] * data[ 2 ][ 0 ]; score -= data[ 0 ][ 1 ] * data[ 2 ][ 1 ] * data[ 1 ][ 0 ] * data[ 1 ][ 2 ]; score -= data[ 0 ][ 0 ] * data[ 0 ][ 2 ] * data[ 2 ][ 0 ] * data[ 2 ][ 2 ]; return( score ); } int calc_score( int index ) { int data[ 3 ][ 3 ] = { 0 }; decode( index, data ); if( has_zeroes( data ) ) return( -1 ); if( has_duplicates( data ) ) return( -1 ); return( calc_score( data ) ); } void show( const int data[ 3 ][ 3 ] ) { for( int j = 0; j < 3; j++ ) { for( int i = 0; i < 3; i++ ) { printf( "%d ", data[ j ][ i ] ); } printf( "\n" ); } printf( "\n" ); } void show( int index ) { int data[ 3 ][ 3 ] = { 0 }; decode( index, data ); show( data ); } int main( int argc, int argv[] ) { #if 0 int data[ 3 ][ 3 ] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, }; show( data ); printf( "Score is %d", calc_score( data ) ); #endif #if 0 int data[ 3 ][ 3 ] = { { 9, 8, 5 }, { 7, 4, 3 }, { 6, 2, 1 }, }; show( data ); printf( "Score is %d", calc_score( data ) ); #endif #if 1 // Brute-force scan of the all possible combinations. // Some of them (containing zeroes) will be ignored inside of calc_score() function. int max_score = 0; for( int i = 0; i < 1e9; i++ ) { int score = calc_score( i ); if( score > max_score ) { max_score = score; } } printf( "The best possible score is %d\n", max_score ); #endif return( 0 ); } ps. I don't normally use plain ANSI C, rather C++, but it grew and grew while writing..
  4. In such puzzles I want to run Visual Studio Express C/C++ so it'll do it for me.. Didn't have time for it, so the first attempt 3023.
  5. Just a side note, people should not vote for candidate who is supporting their personal interests, but who is supporting human-kind interests as a whole. The easiest example is global warming issue. Somebody heavily involved in oil&gas industry by himself/herself or indirectly by e.g. owning large amount of stocks of such companies, naturally wants to sustain it this way, so will vote for candidate who is not accepting global warming, but that is against human-kind interests! Hilariously, if some candidate would say "I will destroy this world!" nobody would vote for such person, but when they say "I will not close coal mines etc., I will reopen already closed one, make more coal power plants, instead will close all these renewable energy plants", such person would get applause from some group of incompetent people.. while the person said exactly the same thing, just using different words..
  6. (if you're Windows user) start from downloading free Visual Studio Express from MSDN website: https://visualstudio.microsoft.com/vs/express/ Recommended is VS 2008 or VS 2010, because they are not tragic slow like the latest versions, which might be annoying for newbie, unless you have top-notch game machine with SSD, 16 GB+ RAM memory and Core i7 etc. Then learn C/C++ (if you don't know yet) https://en.cppreference.com/w/ And learn about TCP/IP stack. It's in WinSock docs: https://docs.microsoft.com/en-us/windows/desktop/winsock/winsock-functions The most obvious difference between WinSock and BSD socks from Unix/Linux, is that at the beginning of Windows app, you must call special initialization function WSAStartup(). This way you will learn how to program Internet and network applications. Everything for free of charge. If you want to call for somebody on this forum, use @ and append proper name of user (or pick it from the list). This way that person will get notification from forum software. And don't misspell.. Like for example: @StringJunky
  7. Why mutation happens? 1) because DNA/RNA is made of Carbon, with tiny tiny amount of radioactive Carbon C-14 which is decaying in the wrong moment of cell subdivision. 2) because DNA/RNA is damaged by e.g. UV photons, gamma photons, and other quantum physics high energy interactions in the wrong moment like cell subdivision. 3) because DNA/RNA is damaged by highly reactive atoms/molecules/ions like free radicals. 4) ..... "The free radical theory of aging (FRTA) states that organisms age because cells accumulate free radical damage over time.[1] " https://en.wikipedia.org/wiki/Free-radical_theory_of_aging
  8. Please don't extrapolate your lack of comprehension to entire scientific community..
  9. You should start from reading Wikipedia page about caffeine compound and its influence on central nervous system. https://en.wikipedia.org/wiki/Caffeine Everything what is overused/overdosed can have negative effects on human health. Health department advises a daily intake of no more than 400 mg for adult.
  10. Bill Gates...
  11. Majority of people think of themselves that they are special. So special that creator of the Universe should listen to their prays and fulfill their wishes. It's childish and naive. There is over 7 600 000 000 (nearly 8 billions) people thinking this way. If somebody had great day, is praising God for it. If somebody had terrible, tragic day, is crying "why God allowed this to happen to somebody so special as I am and my family".. Also people tend to believe in destiny. That they have some mission here on the Earth to do. If that is true, then why majority of people simply waste their lives doing meaningless things all day long? Believing in special mission on the Earth by fanatics, can have dreadful consequences. If somebody is believing in one God (obviously his/her own must be the right one!), rejects other religions, rejects acceptance and tolerance for people believing in other religions, want to evangelize or exterminate them. Fanatics in their mission can even kill people believing in other religions or atheists.
  12. @koti Mitnick was garbage-diver just to learn first name, surname, eventually address of people who worked at company he wanted to attack.. Then calling them, and telling them BS story tale.. e.g. pretending co-worker (for instance from IT department) from the same company. You would not even know hacker or spy is calling at you by phone.. The first name and surname of co-worker would match the real person from company..
  13. You're thinking about hackers who are blindly attacking random people. If attack is at you personally, there is just needed to intercept DNS servers (e.g. by physically disconnecting your cable net), then replace them by fake-DNS servers, with fake-HTTP servers, and auto-updating software on your devices will download fake-apps and install them on the all your devices.. e.g. a spy may be employed in IT, TV/cable, mobile phone operator, and put some device between you and the real network. The all transmission will go through their servers. After DNS-trick mentioned above, entire installation can be removed without anybody knowing about its existence.
  14. @CharonY If such device has WiFi, it does not even require plugging it to user ordinary Internet.. imagine that device is updated by custom firmware to search for any open WiFi and using it straight away... Personally I would prefer to allow programmers to be able to write programs for smart TV like any other device. So, for example I could write tool which would tell whether somebody intercepted my, or yours, device or not yet..
  15. If such device has also camera built-in and voice detector to control it by voice, then it's perfect tool for "1984"... That way you can be watched all-day-long from second side of the world, without having idea about it (like this happens with laptop with built-in camera, and with built-in microphones, and smartphones and tablets).
  16. Don't you think so that you should ask your interlocutor what he/she meant by that, rather than us.. ?
  17. How to measure volume of a thing? Fill glass with water, mark its level. Place something inside, it must be fully submerged, mark water level again. It'll be slightly above the previous mark. Volumes of water plus volume of a thing submerged add together (not always true e.g. some salts + water won't add together). Density of a thing is mass divided by its volume. [math]d=\frac{m}{V}[/math] ps. You should start from reading Wikipedia page about the subject https://en.wikipedia.org/wiki/Archimedes'_principle
  18. If there is rule of addition of HCl, then there should be rules for Chlorination, Fluorination, Bromination, Iodination etc. https://en.wikipedia.org/wiki/Halogenation#Chlorination
  19. For a test, I made ethane molecule in reactant(s) area, then made chloroethane in product area. Result: Then I changed ethane to ethene molecule in reactant(s) area by clicking on bonding to change to CH2=CH2 and result is: So, it's not calculating reaction on-the-fly but searching in database.. ? That' pretty basic example. C2H6+Cl2->C2H5Cl+HCl
  20. You can control strength of electromagnet by increasing current flowing through its wire. After exceeding current limit of wire, it's damaged. If really high currents are needed to create powerful electromagnet there are used superconductors, which are typically operating at extremely low temperatures. e.g. liquid Nitrogen and liquid Helium are used to cool down material to turn it to superconductor. https://en.wikipedia.org/wiki/List_of_superconductors https://en.wikipedia.org/wiki/Superconducting_magnet
  21. Two weeks ago you wrote on VSL website the same question about their product. Authors did not help you solving this issue by themselves? https://www.vsl.co.at/community/posts/t50693findunread-Problem-with-USB-license-key#post279580
  22. Ok, so far. Not exactly. It's exponential function. https://en.wikipedia.org/wiki/Exponential_function with e constant as a base. https://en.wikipedia.org/wiki/Natural_logarithm
  23. What with extraterrestrial intelligent life forms.. ? What with extraterrestrial life forms.. ? What with animals.. ? ps. Your question is human-centric..
×
×
  • 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.