Jump to content

Sensei

Senior Members
  • Joined

  • Last visited

Everything posted by Sensei

  1. 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
  2. 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...
  3. 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..
  4. "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..
  5. Food for thought. Differences between wire nails and square nails (aka "cut nails"): https://www.youtube.com/watch?v=7rwcGXIORro
  6. "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
  7. 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..
  8. ..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..
  9. In different languages, the same task is performed in different ways.. Sometimes differences are cosmetic. Sometimes they are gigantic (alteration of the entire algorithm).
  10. "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.
  11. 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)."
  12. Please calculate the influence of a distant cosmic object using the inverse-square law: https://en.wikipedia.org/wiki/Inverse-square_law
  13. 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.
  14. 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:
  15. 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.
  16. Maybe this technique you will find interesting: https://www.youtube.com/watch?v=ndFdPd6GaHQ
  17. ..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.
  18. 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/
  19. Be nice, lab mouse! ps. I am debugging my code.. then will restart.. again..
  20. 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..
  21. 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..
  22. Sounds like dilution of shares. https://www.google.com/search?q=dilution+of+shares If you have an array/list of integers. Sum them together ("total"). For each one list[index] × 100 / total is percentage of shares. Give some more shares list[index] += new_shares Make a copy of array/list and repeat calculation of percentages. Divide new percentage by old percentage for each entry. They can be <1, =1 or >1. Sort them to learn who gained the most and who lost the most. In the real world it is a more complicated because shares can be voting and non-voting i.e. voting minority (or unaware shareholders) can dilute larger shareholders and screw them up (not nicely. Facebook is an example). Also people can buy, sell or receive options. Usually insiders like management and employees. Typically with restrictions.
  23. We are not talking about the usefulness of a thing 1st world citizen poses and why it is a must have for you. I am certain that even Queen or King of the UK or a billionaire would give us some good reasons why they have dozen of cars in the garage and/or jet planes (how they could get fresh French buns in rural house for breakfast after all?!).. We are talking about how to reduce our carbon footprint.. You firstly do actions which 10x increase your carbon footprint and then wonderfully taking step back (or talking about) actions with 1x influence giving overall 9x.. To me, some of you here, are simply mocking from it, or from me, or from global warming and ecology.. Statistical double or triple the usage of energy by average US citizen per capita, than in EU, and much more than the rest of world, didn't come from nowhere..
  24. ...(or) I will end up this madness...
  25. Housing is the US looks like: give cheap credit to NINJA's, who can't paid them back, harvest them to the last penny.. then take house and land.. then disintegrate it.. and give new credits to new people (NINJA-to-be), to buy new buildings-to-be in the same place... Increase rates, and you can repeat it, once again.. ps. Not without a reason there are afraid of my attendance..

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.

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.