-
Posts
7863 -
Joined
-
Last visited
-
Days Won
26
Content Type
Profiles
Forums
Events
Everything posted by Sensei
-
It is 200 nautical miles (230 miles, 370 km).
-
This is a very useful feature called "autocomplete" or "autofill". https://en.wikipedia.org/wiki/Autocomplete https://en.wikipedia.org/wiki/Autofill It is used all day long in cell phones when typing text, the app suggests a list of words from the dictionary, so you just need to type the first few letters and then the rest is given by the algorithm. https://en.wikipedia.org/wiki/Autocorrection Professional autocomplete is implemented on a separate thread (possibly another CPU core). Querying the dictionary of millions+ db words every time a key is pressed takes some time (milliseconds or so). Doing this on the main UI thread would cause an unpleasant user experience. In HTML code autocomplete feature of form fields can be disabled: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion Entire form: <form method="post" action="/form" autocomplete="off"> … </form> or just some field: <form method="post" action="/form"> … <div> <label for="cc">Credit card:</label> <input type="text" id="cc" name="cc" autocomplete="off" /> </div> </form> (Credit card data, passwords, etc. should not be stored in databases on the local computer) This is a function of the web browser. If you use Firefox: https://www.google.com/search?q=firefox+where+are+autofill+stored https://support.mozilla.org/en-US/kb/automatically-fill-your-address-web-forms You can log in to SFN by entering the username and email address used during registration. HTML source code of SFN: <input type="text" placeholder="Display Name" name="auth" autocomplete="username"> Description of the autocomplete attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete Someone would have to break into your house to use it.. steal the computer.. Or gain remote access to your computer.... In that case, they could just install a key-logger and get that data while you enter it manually anyway. This is a great feature. "Billions" of years of people's live time saved.. The forum software can tell your web browser not to automatically fill in the form data.
-
General advice @Genady if you write an answer to a puzzle, use the [ spoiler ] tag to hide it.. (spoiler option is the eye icon on a desktop computer)
-
Understanding 'Self' and Python instance creation
Sensei replied to WalidKhan's topic in Computer Science
"self" does not have to be called self in Python. It can be anything that is not a reserved word. "self" is the Python equivalent of "this" from other languages such as C++ or Java: https://en.wikipedia.org/wiki/This_(computer_programming) In other words, it is a pointer/holder/reference to the object's data. Each new instance will have a different set of data, pointed to by "this"/"self". https://www.w3schools.com/python/gloss_python_self.asp class Person: def __init__(mysillyobject, name, age): mysillyobject.name = name mysillyobject.age = age def myfunc(abc): print("Hello my name is " + abc.name) p1 = Person("John", 36) p1.myfunc() "mysillyobject" and "abc" are equal to "p1" in the above code. The above code in C++ could look like: #include <iostream> class Person { private: std::string name; int age; public: Person( const std::string name, int age ) { this->name = name; this->age = age; } public: void myfunc() { std::cout << "Name: " << this->name << std::endl; std::cout << "Age: " << this->age << std::endl; } }; int main() { Person *p = new Person( "John", 36 ); p->myfunc(); return( 0 ); } C++ allows you to omit "this". "this" is the default for the object's local variables (i.e. name and age). But since I used these words as constructor parameters, I have to use "this" to differentiate them. I could write: public: void myfunc() { std::cout << "Name: " << name << std::endl; std::cout << "Age: " << age << std::endl; } And the C++ compiler would know that "name" is equivalent to "this->name", and "age" is equivalent to "this->age". It's different in Python and "self" is obligatory. -
..talk to like a five year old child..
-
...people's general understanding of nature.... i.e. if you go to such a place and straighten the river, you don't understand nature, or you understand and know you are doing something wrong.. which can end in disaster.. In a capitalist country? That's not possible.. In a capitalist country everything revolves around money.. Want to reduce the amount of CO2 in the atmosphere? They introduced taxes on CO2.. WTF? WTF!!! Now they are fighting 1) themselves, 2) the mobsters who abused the system, 3) the financiers/bankers (they bought certificates when they were cheap and sold them when they were expensive - any normal capitalist would have done the same thing)! A tax to solve the problem? If a politician is a criminal and wants to steal state money, they will solve the problem by introducing a tax, a fine, a penalty.. They only introduce more problems than they solve.. If you put someone in jail, then jail is a punishment, imprisonment and a fine is not punishment, it is creating more criminals in the future.... A incriminated person is only able to get the lowest paying jobs, so he/she is unable to pay the fines. After getting out of prison, he/she has to become a professional criminal just to pay the fines.. Welcome to the U.S.A.. (In Russia it was worse, they were sent to fight and died).
-
@StringJunky To some extent I agree with you - people want land for farms.. The land around rivers is the best, with many nutrients provided over centuries.. So people are trying to regulate rivers so they flow straight instead of meandering.. For months, years, or a dozen years, it can work. But when the water is too much and flows too fast (because it no longer meanders), flooding occurs.. and this is the result of actions of human-politics-idiots done dozen years earlier.. They are dead, or almost dead retires and result of their action is death of people in the future..
-
Thx. Because the question from the beginning was failure (ambiguous).. does not say that each number (=letter) must be used only once.. For a human reading it was obvious.. Repeat. But give hints, that the answers are wrong i.e. TxxTx, so 5th and 2nd letters must be the same etc. etc. Imagine being a ChatGPT teacher.. Let's see where we/you get to..
-
@Commander
-
higher CO2 means nutrient dilution in plants
Sensei replied to TheVat's topic in Ecology and the Environment
In nature, the faster plants grow, the more the soil is depleted of nutrients (which have not changed/increased accordingly to CO2 levels).. In agriculture, to prevent resource depletion ( https://en.wikipedia.org/wiki/Slash-and-burn ) man first invented crop rotation: the two-field system, then the three-field system, then the four-field rotations. https://en.wikipedia.org/wiki/Crop_rotation https://en.wikipedia.org/wiki/Three-field_system Letting cows, pigs, chickens eat directly from the field is good for it because they poop and pee on it, giving up nutrients back.. ps. The next level is hydroponics in skyscrapers.. where you can control the amount of water and nutrients, temperature, pressure, have an environment free of parasites and pests.. unused nutrients and water are reused (not wasted as in current agriculture) ..they could simply ask any farmer from the 20th century.. -
14.13 g carbon / 12.011 g/mol = 1.18 mol of Carbon 2.96 g hydrogen / 1.008 g/mol = 2.937 mol of Hydrogen 2.937 / 1.18 = ~ 2.5 i.e. proportions are 5 Hydrogen atoms to 2 Carbon atoms.
-
There is a second possible answer: 76928+70475=147403 And here is the source code in C/C++. Not very optimal (it takes ~ 9 seconds for my laptop to go through all the combinations). This is an easy algorithm to convert to multithreading, multi-cpu or GPU. // puzzle (c) 2023 Sensei // // Compile (Linux): // gcc puzzle.c -o puzzle // #include <stdio.h> int get_digit( int value, int index ) { while( index > 0 ) { value /= 10; index--; } return( value % 10 ); } int same( const int *digits ) { if( digits != 0 ) { int value = digits[ 0 ]; if( value != -1 ) { for( int i = 1; digits[ i ] != -1; i++ ) { if( value == digits[ i ] ) return( 1 ); } return( same( digits + 1 ) ); } } return( 0 ); } int main( void ) { int count = 0; for( int i = 0; i < 200000; i++ ) { int u = get_digit( i, 4 ); if( u == get_digit( i, 2 ) ) { int f = get_digit( i, 5 ); int t = get_digit( i, 3 ); int r = get_digit( i, 1 ); int e = get_digit( i, 0 ); int buf[ 11 ]; buf[ 0 ] = f; buf[ 1 ] = u; buf[ 2 ] = t; buf[ 3 ] = r; buf[ 4 ] = e; buf[ 5 ] = -1; if( !same( buf ) ) { for( int j = 0; j < 100000; j++ ) { int k = i - j; if( k < 0 ) continue; if( k >= 100000 ) continue; if( ( t == get_digit( j, 4 ) ) && ( r == get_digit( j, 3 ) ) && ( u == get_digit( j, 2 ) ) && ( t == get_digit( j, 1 ) ) ) { int h = get_digit( j, 0 ); if( t == get_digit( k, 4 ) ) { int o = get_digit( k, 3 ); int d = get_digit( k, 2 ); int a = get_digit( k, 1 ); int y = get_digit( k, 0 ); buf[ 5 ] = h; buf[ 6 ] = o; buf[ 7 ] = d; buf[ 8 ] = a; buf[ 9 ] = y; buf[ 10 ] = -1; if( !same( buf ) ) { count++; printf( "%d+%d=%d\n", k, j, i ); } } } } } } } printf( "%d\n", count ); return( 0 ); } Feel free to modify it to generate such quizzes - get the word dictionary from, for example, /usr/share/dict/words, on Linux.
-
Study humanists, and you will not even be aware of the changes around you.. The girls in the store are always amazed when I tell them they made a mistake.. and gave me too much money.. ..Sorry, I don't understand you? Can you use ChatGPT to translate it for me, please?
-
Let's cheat: ask ChatGPT what the correct answer is.. ps. But be quick... very fast... until I give you the C/C++ source code that generates all the results..
-
Degenerates from army industry are like "on safari" (a quote from "The Mayor of Kingstown"), on either side of this equation.. don't be happy about the extra money you make..
-
Look at the mirror.. Aren't you AI... ? If you are playing chess and you say "let the AI play," it will play the most optimal way found at the time.. Same chessboard, same (optimal) movements.. You play tic-tac-toe.. and it's always the same.. There are not many ways to win the game..
-
This sentence makes no sense whatsoever. The genetic code is now being used to identify people who have committed crimes. So if someone has your DNA they can frame you.. People with money can buy specialized (personal) gene therapy. Poor people can't. So it is economical discrimination. ps. Nothing new..
-
Have you seen the ocean world map? https://www.google.com/search?q=seawater+world+map+ph
-
@Saber You don't need to understand.. all you have to do is follow the 4 minute video tutorial..
-
To configure a VPS, or dedicated server, you need to connect to it. On Linux, this is done via SSH (hence the need to install Linux, or run it from a Linux Live flash drive - which I described in a previous post). However, there is a tool for Windows that you can use PuTTY. Tutorials on how to use PuTTY: https://www.google.com/search?q=how+to+use+putty For an example, watch this 4-minute video:
-
Setting up OpenVPN is a much more challenging task than Tor and proxychains, which I suggested.. ..if you have VPS, and ANY internet works.. then it will work.. ..if not.. you have to grab satellite i.e. Musk's.. I have asked many questions and received no answers from you.... ..but you should have followed the instructions and not read them twice....
-
...United States budget? ;) The black hole sucks everything they can get, just like any government..
-
What is the technical term for direct connection ?
Sensei replied to Externet's topic in Computer Help
WiFi Direct https://en.wikipedia.org/wiki/Wi-Fi_Direct The smartphone can be configured to create hotspots, which can be found by other devices. I am using it all day long. https://en.wikipedia.org/wiki/Tethering -
.the real problem is with doctors who want (too much) money.. You want to help people. Or you want their money.. You can't treat people and steal their money at the same time.. Hundred thousands or millions of dollars for "experimental therapy" or "terminally ill" person? Your PhD is dismissed.. Don't complain at the police station you cannot log in to your banking accounts etc.. @StringJunky We will have to remember not to respond to Erina threads next time.. I upped completely undeserved downvote.. ..which governmental, once-created institution does not want more public money next year than it got last year? Which one? People are thieves.. Just leave your smartphone in an apartment with multimillionaires.. I used to make fun of them, and put the latest iPhone in the trash at the bottom and covered it..
-
In a capitalist country? .... In which country? ... In a communist country? Make an non ambiguous request.. then you might be satisfied..