Jump to content

fixthissite

Trade With Caution
  • Posts

    364
  • Joined

  • Last visited

  • Days Won

    2
  • Feedback

    0%

Everything posted by fixthissite

  1. Wooooooooooww..... that paper is filthy. Should take better care of your legal documents.
  2. Good luck with official scripter status! Here are some tips to help improve your code: Use lambdas for your action and change listeners. It's less verbose and more efficient. Don't extend JFrame, as that floods the API of ObjectLoader with a bunch of irrelevant inherited methods (and ObjectLoader is not a frame, it has a frame). Return Collections, not arrays. This allows easy stream usage and implementation-specific looping through forEach. Although devs can use Arrays.stream(T[]), chances are they'd rather turn it into a collection and use it as such. Only use arrays if you want devs to be able to easily add items at a specific index (without needing to manually fill the collection up to that index). Do not return null. Read the null section of this thread (http://osbot.org/forum/topic/81558-some-java-tips/) Use forEach loops for implementation-specific loops: objectListLoaded.forEach(o -> objects[objectListLoaded.indexOf(o)] = o);No need for an isVisible variable, as JFrame has an isVisible() method.It seems you hide the frame, but never dispose it. Dispose it when it's no longer needed. Why do you pass Script to the constructor of ObjectLoader and openLoader? If you want some more tips, feel free to message me! If you don't understand anything I've said above, let me know
  3. omg so funny. brings the recursive "ha" to my tribe.
  4. fixthissite

    Damages

    Without a proper diagnosis, you could end up causing more damage in your attempts to fix whatever is wrong. There's not much you can do without knowing exactly what the issue is. Have you tried clearing the CMOS? Motherboards usually have either a "jumper" which can be used to clear CMOS, or a CMOS battery which when removed resets it (assuming your board hasn't integrated it into the south bridge). CMOS is responsible for core details such as hardware settings, so corrupting this could result in undefined start-up issues. It's always best to clear it when you can't determine the problem on start-up and you lack the needed tools to properly diagnose the situation.
  5. fixthissite

    Damages

    If you do not hear a beep, chances are there wasn't enough resources to complete the POST (or even get to the point of loading peripherals). The fact that the fan started up leads me to believe your PSU is fine, but your motherboard may have taken some damage. But just to make sure, test your PSU.If it's not a PSU issue, clear your CMOS to ensure any start-up information was not corrupted during the unexpected demounting. If you're still encountering problems after that, there's a good chance the unexpected dismount shorted your motherboard. This is a pretty far jump in diagnostics, but it's all I can conclude without manually testing each piece of hardware connected to your board. The best thing to do would be to get your hardware diagnosed at a computer repair shop. You can't be sure if other hardware may have been corrupted in the process (it's possible), so diagnosing your hardware could actually save you money depending on the problem. If you're a computer scientist in the making, I suggest investing in your own hardware diagnostic tools to prevent further costs in the future.
  6. fixthissite

    Damages

    Your BIOS should have detected the problem during it's POST and beeped to alert you of what kind of error it is (depending on your manufacturer's set of beep codes). That should inform you whether it's RAM failure, power failure, CPU problem or a problem with your board
  7. Where are the statistics that prove you will not get banned after 24 hours? This seems more like a rage thread, especially after coming across your price check thread.
  8. He hasn't consumed the stream yet, he's just storing it in a variable.@OP It's best to say streams are good for "collections" rather than lists, since it also applies to sets and maps (although a map isn't a "true" collection, it can still be seen as one). Other than that, this is a pretty nice guide Although in my opinion, the code used to demonstrate is a bit verbose (anon class and a bunch of conditions), which may be a distraction to some. I recommend finding a more pleasing chunk of code to work with for the sake of teaching. map and flatMap are also extremely useful, I highly suggest checking them out
  9. That's the spirit, take all the advice you can get, research to filter out the bad advice. Good luck on the paint, feel free to pm me for advice Just another quick tip, for functional interfaces like Filter (interfaces with 1 method), you should use a lambda expression: npcs.closest(npc -> ...); Since anonymous classes are still classes, class files are generated for each one you declare. Since lambdas use method handles, they are not a victim of this. Shrinks the amount of space your project consumes and is less verbose. I also suggest checking out this thread about using MethodProvider's fields rather than getter methods It may confuse people into thinking VMs can handle many short-lived objects without worry. For anyone whos wondering, the article is stating that GC algorithms have been adjusted to sweep dead objects when memory is needed (more specifically, for the young generation of heap). If objects aren't continuously being created within a short time frame, then its most likely not a problem. A better way to handle this situation is to profile your code, don't optimize based on assumptions
  10. The thread is titled "improving", so don't take criticism so poorly. Use it as a ledge to pull yourself up.Although it works, there's a bunch of excess processing. Some may be ommited by the JIT, but thats implementation specific (someone using a different type of VM may not get the same benefits); it's best to avoid excess processing within code. Not only is it excess processing, there's a cognition issue. You are increasing the focus requirement needed to understand your code. This hurts when it comes to refactoring and scaling in the long run. Just because something works does not mean it works well. Constructive criticism is what opens your eyes to things you may have not realized before. Take all the criticism you can get, it builds character.
  11. That's the problem. You heard its unreliable, just like you heard mirror client is reliable. But unless you really know why, you can't be sure which is which. Don't always believe what you hear. Dig into the facts. If you feel mirror bot is reliable, why is it reliable? That's a good place to start. :Thumbs-up:
  12. You are performing the same check multiple times. For example: if ( r == 255 && g < 255 && b == 0 ) { g++; } if ( r == 255 && b > 0 && g == 0 ) { b--; } You check if r == 255 twice. Consider using if-else statements: if(r == 255) { if(g < 255 && b == 0) { g++; } else if(g == 0 && b > 0) { b--; } } else if(r == 0) { if(b < 255 && g == 255) { b++; } else if(b == 255 && g > 0) { g--; } } else if(r > 0 && r < 255) { if(g == 255 && b == 0) { r--; } else if(g == 0 && b == 255) { r++; } } Although this helps with the checks, it can still be improved greatly. First, there is a specific time for a specific color to increase and for it to decrease. It's a little easier to understand if you label your conditions: boolean maxRed = r == 255; boolean noRed = r == 0; boolean someRed = r > 0 && r < 255; boolean maxGreen = g == 255; boolean noGreen = g == 0; boolean someGreen = g > 0; boolean notAllGreen = g < 255; boolean maxBlue = b == 255; boolean noBlue = b == 0; boolean someBlue = b > 0; boolean notAllBlue = b < 255; if(maxRed) { if(notAllGreen && noBlue) { g++; } else if(noGreen && someBlue) { b--; } } else if(noRed) { if(notAllBlue && maxGreen) { b++; } else if(maxBlue && someGreen) { g--; } } else if(someRed) { if(maxGreen && noBlue) { r--; } else if(noGreen && maxBlue) { r++; } } So green only increases when there is max red, no blue and notAllGreen (0 to 254 green). It goes down if theres no red, max blue and some green (1 to 255). With that knowledge, and the help of the variables (which could be inlined if wanted), you can use a nested ternary. Although people find nesting ternaries to be abuse (hard to read sometimes), it's a lot easier to understand than what you got going on now: boolean needsGreen = maxRed && noBlue && notAllGreen; boolean reduceGreen = noRed && maxBlue && someGreen; g += needsGreen ? 1 : reduceGreen ? -1 : 0; b += ...; //do same for blue r += ...; //do same for red This code is a victim of the same problem I mentioned before (double checks), but not only is it cleaner, ternaries help avoid branch predictor failures (see this for more info). I'm gonna be honest, I haven't tested the code I presented, but the philosophy still applies
  13. Java uses quite a few tricks to achieve what other languages have while still being user-friendly, and this is a great example. Although, after reading the article, I was kinda confused. For anyone having troubles understanding, if objects were pass-by-reference, this would be possible: void method(String string) { string = "second"; } String string = "first"; method(string); System.out.println(string); //prints "second" Rather than passing the actual reference to that object, a new reference is created (the formal parameter), which then references the object. So saying object references are pass by value is not true, since a reference value is a pointer to the object, and passing the reference value (pointer) is passing by reference. If you wanna get literal with it, object identities are (currently) pass by value. Another thing that confuses some developers is how generics are a compile time illusion, and all generic types are converted to Object (type erasure) once compiled. This is why you cannot have "void method(List<String>)" and overload it with "void method(List<Integer>)", since both compile to the same after erasure.
  14. A decent DoS attack usually come from all directions. The idea is to gain access to many vulnerable computers (through some kind of virus or worm), then using the network those devices are connected to send an overwhelming amount of requests to the server (usually by finding a part of the site with no flood control, such as previewing your post)
  15. It's not a deadlock problem. You never call notify in your button's action listener, so the script thread stays waiting
  16. I know you probably don't care for what I think, but I feel the "facts" statement you made was extremely hypocritical.You said scripters do not care, but they do. Maybe you don't, but how could you try and speak for all scripters when there are scripters complaining on this thread? You say you haven't seen anyone send a PM to an admin/dev when that information doesn't have to get to you in the first place.. I know a few scripters who are friends (you and Eric for starters), and although there may be rivals, which is common in a competitive market, I'm sure they can get together to agree on script market decisions. Hopefully they do. I'll leave you alone now. You have my skype if you wanna talk.
  17. Is that script (by chance...) owned by someone ranked higher than "official scripter"? If so, I'm not surprised at all, as I've seen a similar thing happen in the past. Scripters are allowing such things to happen, though.Like I said, America would not be America if it weren't for soon-to-be Americans pushing for what they felt was justifiable. I do agree with Elliot when he implied instilling fear was not the most professional way to go about it. But when all else fails...
  18. The replies/likes on this thread prove scripters do care (although not all scripters have posted in this thread admitting it, apparently there are some reputable scripters who do care).jose stated that scripters are slowly improving on communication. I'm aware a lot of scripters don't like each other. But if they wanted change, "the enemy of my enemy is my friend" should come into play, and they should suck up their pride temporarily. But that's a different story (on maturity). Yes, pming them about the situation would be a lot easier/tamer than what I suggested. If you haven't seen anyone do it, that's probably because it was in a "private" message. Alek does not have a PM button on his profile (last time I checked), and I see no reason for a non-scripting admin who is currently running their own RSPS to do anything more/less than redirect you to the rules. The lack of effort put into ensuring distribution of safe but progressive scripts is overwhelming. It seems as if pros and cons are not weighed, and the rules are put in place due to paranoia of previous failures which are never examined properly to see why they failed. All I'm saying is if scripters want change, they gotta make it; they must stop putting their tails between their legs. I'll leave it at this; no need to be filling this thread up with debate. Although, I do hope scripters realize their position.
  19. I can see how that situation could be a problem. But it's the context of the situation that makes it a problem (no quality check, no disclaimers on scripts that don't get checked for quality, ect... No professionalism).As you said, people around here rarely change their mind. They have no incentive to change their mind. Fear would give that incentive. Like I said, it's just some food for thought. If scripters want change (which it seems they do), they'll think about it and formulate some way to make that change; I'm just trying to make them realize they have more power than they apparently realize. Think of it similar to the American Revolution. If America accepted the answer "No" from the British as easily as you guys are, there would be no America.
  20. You guys have more power than you realize.If you guys want to make change, you guys need to instill fear. Make them realize that you guys can easily move to another client, bringing along your customers, which would impact them a lot more than eazing up on the rules (and possibly quality checking them?). US government uses fear to assert themselves all the time. Works like a charm. You guys have the power (are in the position) to do so. Just some food for thought.. There's a difference between non-wanted and non-allowed. Not to mention, the economy changes, so it's not completely strange that some scripts don't share the same longevity.Scripts are bound to end up out-dated and/or forgotten about at some point. If not, why is the amount of new scripts being released waaay higher than the amount of content being released on the game? There are scripts being written now that'll be forgetten within a week or so. If they are not wanted, they will not be bought. If they are not bought, there will be no incentive to make them. If they are bought, then apparently some people wanted it. It would definitely work itself out..
  21. This baffles me..You guys keep the gears oiled, yet you are forced to follow faulty rules, getting in trouble if a fault is exploited. I gotta admit, it's pretty enjoyable to watch. But it kills me to see you guys taking it so easily. Was lube even needed? You guys could be bringing in sooo much more cash, and possibly compete with some of the bigger names. Instead, you guys have rules which have no true justification (put in place due to paranoia) which sets the bar (of what's possible) pretty low. Wasted potential.. And people ask why I don't script..
  22. Wouldn't this be against the rules? Unless OSBot rules doesn't account for federal law
×
×
  • Create New...