Sharpienero

Forum User
  • Content count

    71
  • Joined

  • Last visited

Everything posted by Sharpienero

  1. Happy birthday.
  2. May I ask why you're not interested in w10? It's optimized.
  3. I don't know about that.. Even if you have 4gb and are using a small amount of rainmeter add-ons, you should be fine. I use 16gb and don't use rainmeter, but I've never had an issue with it on any of my machines (both low end and high end)
  4. A program called rainmeter.
  5. Desktop:
  6. Laptop running eOS:
  7. You're wrong. Torrenting, as an ideology, is a wonderful concept and works wonderfully in practice. The people who are making paidware into freeware see themselves as doing the public a favor. There are many ways to make it so that average users and people cannot crack your product. But companies would rather save money. Piracy hurts the industry, yes, but if companies were smarter they would use a better and more achievable model.
  8. Torrenting isn't illegal in most cases, it's seeding that is. And popcorn time does seed. But it's all solely based on your ISP.
  9. Hey everyone, I'm writing this program in order to further understand two-dimensional arrays and the manipulation of them in c. Basically what the program is supposed to do is the following: Prompt the user for the borders of the arrays. Prompt the user for the amount of iterations they want to go through the arrays and find averages. Ensure epsilon (the error checking value) is less than the largest change in value. Calculate convergence. If you don't know what epsilon or convergence is, don't worry about it. I'm having issues with my while/for/for nested loops working properly. At the moment, no matter what iteration is set to, it's only iterating once. It's probably a simple mistake that I'm overlooking, and a fresh set of eyes would be glorious. The program is supposed to look at a single element, and then take the element "above" it, to the "left" of it, to the "right" of it, and then the "bottom" element. Then it multiplies (or divides it) by a 4th. Meaning if the user enters 1 0 0 1 as the border input, it should look like this after ONE iteration (which mine does). 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 0.50 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.25 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 If you need a further explanation, please ask and I will expand best I can. Please note that I've written all of this myself with minimal assistance. I would love to hear about your opinion of my styling, logic, and neatness. #include <stdio.h> #include <stdlib.h> int i, j, iterations, sTop, sRight, sBottom, sLeft, counter = 0; double ep; float diff; float array1[10][10]; float array2[10][10]; float aTemp[10][10]; int main(void) { puts("Please enter the epsilon variable:"); scanf("%lf", &ep); printf("Ep: %lf\n", ep); if (ep <= .1 && ep > 0) { puts("Valid input."); } else { puts("Invalid input."); return 0; } puts("Please enter the maximum number of iterations:"); scanf("%d", &iterations); puts("Please enter the top, right, bottom, and left boundary. (example: 1 2 3 4)"); scanf("%d %d %d %d", &sTop, &sRight, &sBottom, &sLeft); //Print statements (Mainly for debugging) printf("Ep: %lf\n", ep); printf("Iterations: %d\n", iterations); printf("Top: %d Right: %d Bottom: %d Left: %d\n", sTop, sRight, sBottom, sLeft); //Fill boundaries with user input. for (i = 0; i < 10; i++) { array2[0][i] = array1[0][i] = sTop; array2[i][9] = array1[i][9] = sRight; array2[9][i-1] = array1[9][i-1] = sBottom; array2[i+1][0] = array1[i+1][0] = sLeft; } //Fill interior with 0s. for (i = 1; i < 9; i++) { for (j = 1; j < 9; j++) { array1[i][j] = 0; } } //Calculate next grid fill. Multiply by .25 because faster than division by 1/4. while (iterations != 0) { for (i = 1; i <= 9; i++) { for (j = 1; j <= 9; j++) { array2[i][j] = ((array1[i-1][j] + array1[i+1][j] + array1[i][j-1] + array1[i][j+1]) * 0.25); } } aTemp[i][j] = array2[i][j]; array1[i][j] = aTemp[i][j]; iterations--; counter++; } //} //Print out the matrix1. puts("Matrix 1!"); for (i = 0; i < 10; i++) { for (j = 0; j < 10; j++) { printf("%.2f ", array1[i][j]); } puts(" "); } //Print out the matrix12. printf("Converged in %d steps.\n", counter); puts("Matrix 2!"); for (i = 0; i < 10; i++) { for (j = 0; j < 10; j++) { printf("%.2f ", array2[i][j]); } puts(" "); } return 0; }
  10. This is actually why I used i and j. Asubij is generally how you see matrices. If you were taking a product of two matrices I would still use i and j. But yes, total preference when programming.
  11. My account is maxed.
  12. I ended up making a method to find the highest values in both of the arrays and set it equal to diff. Thanks!
  13. 1) Age of empires 2) CS 3) LoZ 4) Metro 5) Runescape
  14. 7 months? That's a lot of dedication.
  15. Yo!

    Welcome to the forums.
  16. It's okay - the assignment was specifically for a 10x10 grid. On a much larger scale I would never do it the way I had done it here. On a side note, why are nested loops bad? My professor swears by them. @@BraXi - This is actually the fix: // !!! these two are probably your bugs - you're using [i][j] outside of f/f loops !!! // THEY ARE ALWAYS: // aTemp[9][9] = array2[9][9]; // array1[9][9] = aTemp[9][9]; It's hard to believe I would over look something so simple. Thank you for pointing that out. Another question: How would you compare the two elements to find the max difference between them? For example, if I was to want to compare array1 and array2. I would have to find the largest 2 values in each and then compare them, yes? Is there a simple way to do this in c?
  17. Hey Braxi, Thanks for your input. The temporary array was actually just me testing things. It's got no real point at all, as you've noticed. I'm actually thinking I should use a while loop on top of that for loop in order to check for max value between the two arrays against epsilon, as well as number of iterations. Would that make sense?
  18. It's actually a donation plugin theme. I'm sure it could be changed easily to match inside of the plugin theme folder.
  19. Job market, money, a personal challenge, the desire to kow more knowledge, and its simply fun.
  20. Hi guys, My name is Patrick. I'm a mook, but I am also Mook. I just wanted to drop by and actually post something here. I should be studying for a biology exam, but I decided that creating this topic was of highest priority. P.S - Troll said that I sounded posh this morning. That was kind of interesting to hear. P.P.S - Let me apply for admin.
  21. He doesn't like that there is a leading 0. When it's 17:15, it says 05:15. He thinks it should simply say 5:15. It's irrelevant.
  22. Suggestion

    Soundcloud: https://mega.nz/#!DhsFSRCA!XSu_mcnFYYl2vLrCI3EBNjt-wMN7koLfYokAiupt0UM Twitter: https://mega.nz/#!e0slmCQL!yatI4wCaL5LTOIM9uuvFFox22dAx3nb4Nz3IIPHwPoA You're welcome. :wub:
  23. Copycat. Just teasing. Good job.