Skip to content

Sensei

Senior Members
  • Joined

  • Last visited

Everything posted by Sensei

  1. Many of the flowerpots I see here in stores look just like this: 2D profile: 3D visualization: If you want to have some water in the bottom of the container, simply drill a hole on the side... In the literal half way, IMHO it is way too extreme. What is the average amount of rainfall in your country region? What are the dimensions of your container? How much water do you want (in liters)? The area of the container x the average amount of rainfall will give us the volume of water. Do the roots of your plants like plenty of water? If not, they will begin to rot.
  2. Sensei replied to StringJunky's topic in Politics
    Did he shoot somebody, traveling 20 miles (~30 km)? If you take something from house, you don't throw away after 10 miles.. Regardless of distance.. Distance does not matter. Intentions do matter. Everybody has some lethal weapon at hand.. I have keyboard and mouse at hand, for some mortal human, they are lethal weapons..
  3. Sensei replied to StringJunky's topic in Politics
    ..but the question is: if such brainwashed far-right wingnuts are on the street, they should be "de-weaponized" the way they did (and are being killed).... How to differentiate "brainwashed far-right wingnuts" from "brainwashed far-left wingnuts" from "brainwashed wingnut" from "terrorist" from "gangster" from "mob member" or from [put anything] in the middle of action.. which is very 'dramatic'/'dynamic'.. Looking at the video of the whole accident, I find him not guilty..
  4. Sensei replied to StringJunky's topic in Politics
    Right. Right. Isn't what they want? Everybody to carry gun "to shoot bad guys".. ? Weaponize the all teachers etc. ? https://www.theguardian.com/us-news/2018/feb/21/donald-trump-solution-to-school-shootings-arm-teachers-with-guns
  5. Sensei replied to StringJunky's topic in Politics
    I wasn't talking about the trial... I was talking about the "accident"/"shooting"... a real movie...
  6. Sensei replied to StringJunky's topic in Politics
    Did you (or participants of this thread) bother to watch entire "accident" ("video")? Victims were black/darker skin.. ? Look up data again to verify it..
  7. "I feel attacked by Stumpy Devs! I try to avoid using interpreted languages, recursion and things that leads to stack overflow and anything that’s not a high tech.. 😂 " ps. Sorry for OT, I could not resist to paraphrase you.. ps2. I hear a lot of devs who after hearing the problem, answer "find a library that will do it" (instead of writing something themselves)... It's funny/weird (especially even) if the problem is trivial and can be solved faster by handwriting than by learning how to use a third-party library..
  8. Food for thought. Differences between wire nails and square nails (aka "cut nails"): https://www.youtube.com/watch?v=7rwcGXIORro
  9. "Elemental carbon exists in different structural forms including graphite, diamond, fullerenes, and amorphous carbon. In nature, these materials are produced through abiotic chemical processes under high temperature and pressure but are considered generally inaccessible to biochemical synthesis or breakdown. Here, we identified and characterized elemental carbon isolated from consortia of anaerobic methanotrophic archaea (ANME) and sulfate-reducing bacteria (SRB), which together carry out the anaerobic oxidation of methane (AOM)." "In addition, we found that select methanogens also produce amorphous carbon with similar characteristics to the carbon from AOM consortia." More at link: https://www.science.org/doi/10.1126/sciadv.abg9739
  10. Show source code... Whenever a programmer uses a division operator with a non-static denominator he/she must catch a divide by zero in advance or exception. *) The code in C/C++ e.g. double a, b, c, d; // initialized double e = a * b / ( c * d ); is incorrect/wrong since the beginning. It should be: double a, b, c, d; // initialized double x = c * d; // temporary variable double e = ( x != 0 ) ? a * b / x : DBL_MAX; (alternative to DBL_MAX are https://stackoverflow.com/questions/5834635/how-do-i-get-double-max or https://stackoverflow.com/questions/8690567/setting-an-int-to-infinity-in-c or https://en.cppreference.com/w/c/numeric/math/INFINITY ) Whether dividing by zero is treated as dividing by a very small value (leading to the result of infinity) depends on the context... *) not obeying this rule will lead to random application crashes..
  11. ..but do you know that the most of modern computers don't even have HDD.. ? practically the all sold laptops in shops have SSD and NVMe storages.. SSD is 10x faster (550 MB/s) than HDD (55 MB/s) NVMe (1500-3500 MB/s) can be 30-60x faster than HDD..
  12. In different languages, the same task is performed in different ways.. Sometimes differences are cosmetic. Sometimes they are gigantic (alteration of the entire algorithm).
  13. "SQL (Structured Query Language) is a standardized programming language that's used to manage relational databases and perform various operations on the data in them. ... SQL became the de facto standard programming language for relational databases after they emerged in the late 1970s and early 1980s." SQL is not a general purpose programming language. You must have code that opens the database, creates a table, inserts records, queries records, deletes records, modifies records, and closes it. MySQL is typically used from server-side PHP, Java, Python etc. or client-side JavaScript. SQLite is typically used from Android's Java/Kotlin/Xamarin. It is possible to make changes to the SQL database from the db admin panel by manually typing your own SQL commands. e.g. mysqladmin for MySQL: https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html Any serious web-hosting company installs such a SQL admin panel, accessible from the HTTP server, to access the database in emergency situations. It is usually used for database backups.
  14. The density of muscle is ~1.1 g/cm^3. The density of fat is ~0.9 g/cm^3. 1.1/0.9 = ~1.22 ratio (+22%). A person with the same height, same weight, but an athletic body, can have a much smaller body volume than a person with the same properties but with fat instead of muscles. BMI does not include this information. Therefor the BVI (Body Volume Index) was introduced. https://www.google.com/search?q=body+volume+index "How do you calculate BVI? BVI was defined as total body volume/height^2 (L/m^2)."
  15. Please calculate the influence of a distant cosmic object using the inverse-square law: https://en.wikipedia.org/wiki/Inverse-square_law
  16. I used the word "endpoint" to make distinction from a control point that not lie on the bezier curve. I made these four beziers (on the left), it has four endpoints (as you can see), and some control points flying in a void (the curve does not go through them *), and frozen to polygons version (on the right). *) they can be disconnected ("unweld" tool in 3D app), and instead of 4, we will have 8 of them.. Is this what you want to achieve? (and you call it "Bezier patch"?) Are you doing it in some programming language like C/C++ with OpenGL/DirectX for visualization? Routine can look like: freeze each bezier to well-defined number of points and interpolate frozen points.
  17. OK. I used a 3D application to visualize it in 2 dimensions. Below we can see 3 beziers. A straight line (just to visualize) is going from the control point of the 1st bezier, then through the endpoint shared by 1st and 2nd bezier, then to the control point of the 2nd bezier. A bezier patch must be created from four beziers, which have 4 endpoints and 8 control points. Move the control points so as to break the straight line (slope) between them, and you will lose smoothness:
  18. A bezier consists of two endpoints and two control points. The endpoint from one bezier must be in the same position as the endpoint from the other bezier. The control point-endpoint line from one bezier must form a straight line with the control point-endpoint from the other bezier. An equal slope means a smooth transition between patches.
  19. Maybe this technique you will find interesting: https://www.youtube.com/watch?v=ndFdPd6GaHQ
  20. ..my distribution of Linux has tools to scan WiFi, intercept encoded passwords, and then decode them.. Worse. Every app has some tools that are useful to someone, but 99.99% of users have no idea about them and/or have never used them (because they only focus on the one they learned). Should these tools be removed from the app? This would reduce bandwidth for 99.99% of users. Plugins to download with the tools and/or pay for each tool independently. This is the direction the IT world is heading, i.e. you only buy a subscription for a month, quarter, year or more, and/or pay multiple times each time you need it e.g. in-app purchases are now common in games. A free game with items to be bought in-app. The effect is that the user has to pay much more at the end, and the IT company gets a flood of money long after the product is released.
  21. Windows 11 looks better than Win 10.. It can run Android apps directly on your PC! https://blogs.windows.com/windows-insider/2021/10/20/introducing-android-apps-on-windows-11-to-windows-insiders/
  22. Be nice, lab mouse! ps. I am debugging my code.. then will restart.. again..
  23. Not only. When you whisk an egg white, it turns a white color without any cooking. ps. Have you started pumpkin season yet? I made a pumpkin pie last week. You need: a cup (i.e. 250-300 mL) of oil, a cup of sugar, a cup of pumpkin, 250g of flour, 3 eggs, a teaspoon of baking soda, a teaspoon of baking powder, and eventually a teaspoon of cinnamon and/or vanilla/vanillin sugar. Whisk the egg white, blend the rest, join with egg white and to 40 minutes to the oven. Takes less time of work than me writing this recipe..
  24. Apart from what @Ghideon said: You have missing semicolons in several places. Groovy online interpreter accepts it, but it will learn you bad habits. 'slope' and 'intercept' are nowhere declared and then used as either variable and as method/function name and also nowhere declared.. My fixed version which passes through online Groovy interpreter: https://www.tutorialspoint.com/execute_groovy_online.php Looks like: /* Hello World in Groovy */ double slope( double a, double b ) { return( a ); } double intercept( double a, double b ) { return( a ); } double simple_regression(double dependend_values, double independend_values, double x_test) { double slope = slope(dependend_values, independend_values); double intercept = intercept(dependend_values, independend_values); return intercept + slope * x_test; } But you will need to fill slope() and intercept() with proper functionality. SimpleRegression java class from: https://commons.apache.org/proper/commons-math/javadocs/api-3.3/org/apache/commons/math3/stat/regression/SimpleRegression.html doesn't have addData() without parameters..

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.