Project Possible Cheat Code

0 views
Skip to first unread message

Sadie

unread,
Aug 5, 2024, 1:22:31 AM8/5/24
to therzanoty
HiMartin ,

thanks much for responding, I have a codebase . Got it scanned and received a report of some issues

but I marked quite a few false positives .

now whenever a new code is committed the sonarcube only detects the new codes that were committed.


For long-living branches (e.g. your main branch), the full source code should already be scanned. We just split the view so that you can easily focus on the new code first. If you are on your main branch summary in the SonarCloud user interface, you should be able to switch to the overall code as well.




This is possible as well. We distinguish between short-lived and long-lived branches. Short-lived branches behave similar to pull requests and thus only results from changed code will be reported. Long-lived branches are very close to your main branch, where you will be able to look at the overall results as well.


You can find the configuration of the pattern we use for this distinction on your branches page on the top right. After setting this up to your liking, you have to remove the branch (the one that should switch from short-lived to long-lived) from SonarCloud and run the analysis again. Now you should be able to see the results both for new code and overall code as well.


Actually having the same problem.

Code smell was merged to master long time ago(90+ days, while New code definition is 90) and not visible in Overall Code for master now.

However same code smell still visible in PR branch analysis and related code still exists in master codebase.

How can I rescan entire project (master) to see ALL issues in master?


so, when i was a kid, i was playing Emerald on an emulator on my phone, as far as i know, i didn't put in a cheat code for a lugia encounter, but while sailing the ocean, i had a random encounter, normal stuff right? turns out Lugia decided to drop in and see how i was doing. I did the usual strat of quick-save quick-load-ing until the pokemon is caught on the first try (i really wanted to be mr. perfect in emerald as a kid), then tragedy struck, i accidentally quick-saved while Brandon was throwing the ball and no matter how many times i tried to quick-load, the damage was done. lugia broke out of the ultra ball and ran. i'm about to get a gameboy SP and a copy of emerald, and i was wondering if i could maybe encounter lugia again by following some steps, but apparently it's impossible to catch lugia unless you use an action replay/cheat shark to give yourself a ticket to navel rock, so i'm posting here to see if anyone else has had an encounter like this.


Edit: i do remember getting a bad egg, but the only cheat i ever remember being installing on the emulator was a walk through walls cheat, and that was for fire red, i also think it's important to mention that besides my phone, i also remember playing it on a computer, also on an emulator (obviously), but i can't seem to remember which one i got the bad egg in.


The only way to get a legit Lugia in Emerald is to gen a mystic ticket into your game, that lets you fly to the island where you can get both Ho-Oh and Lugia. These are considered legal pokemon, and you can trade them all the way to gen 8. Unless you're playing a hacked ROM, that's the only way to get these legendaries in Emerald, altho there is a way to get Ho-Oh in Colosseum and Lugia in Gale of Darkness, if you want, and transfer them over as well, using Trigger's PC to trade the pokemon between saves like a fan made Poke Bank works wonders and I recommend it as well




What you're probably referring to would be either Latias or Latios, roaming legendaries that can be caught theoretically anywhere once they're triggered, Latios looks similar to Lugia at first glance and can escape you if you fail to catch it


Not quite "impossible" since it also would depend on how the Action Replay gives you the shinies, for example, some AR force the same Shiny PID everytime so even though the pokemon would be legal, they'll all be "clones" of each other and that of course would be an obvious sign that they're not legit.


I checked the PID on the pkhex, and they have different PID

At this point, in my opinion, spending hours/days for found a legit shiny no longer make sense.. but is only for a personal satisfaction..


But, so why the cheat codes work fine in Black/White? And generated 100% legal shiny pokemon? The Pkhex considering all of them as Legal!

In Black2/White2 the situation is very different, i used the same cheat code, but only (for example) 4 of 10 shiny generated are considerate legal by Pkhex, what is the problem with the others mons?


Understand the operator basics. The C++ operator new allocates heap memory. The delete operator frees heap memory. For every new, you should use a delete so that you free the same memory you allocated:


Reallocate memory only if you've deleted. In the code below, str acquires a new address with the second allocation. The first address is lost irretrievably, and so are the 30 bytes that it pointed to. Now they're impossible to free, and you have a memory leak:


Watch those pointer assignments. Every dynamic variable (allocated memory on the heap) needs to be associated with a pointer. When a dynamic variable becomes disassociated from its pointer(s), it becomes impossible to erase. Again, this results in a memory leak:


Be careful with local pointers. A pointer you declare in a function is allocated on the stack, but the dynamic variable it points to is allocated on the heap. If you don't delete it, it will persist after the program exits from the function:


You can use some techniques in your code to detect memory leak. The most common and most easy way to detect is, define a macro say, DEBUG_NEW and use it, along with predefined macros like __FILE__ and __LINE__ to locate the memory leak in your code. These predefined macros tell you the file and line number of memory leaks.


Debug_new refers to a technique in C++ to overload and/or redefine operator new and operator delete in order to intercept the memory allocation and deallocation calls, and thus debug a program for memory usage. It often involves defining a macro named DEBUG_NEW, and makes new become something like new(_FILE_, _LINE_) to record the file/line information on allocation. Microsoft Visual C++ uses this technique in its Microsoft Foundation Classes. There are some ways to extend this method to avoid using macro redefinition while still able to display the file/line information on some platforms. There are many inherent limitations to this method. It applies only to C++, and cannot catch memory leaks by C functions like malloc. However, it can be very simple to use and also very fast, when compared to some more complete memory debugger solutions.


For me: whenever I create dynamically allocated objects, I always put the freeing code after, then fill the code between. This would be OK if you're sure there won't be exceptions in the code between. Otherwise, I make use of try-finally (I don't use C++ frequently).


In visual studio, there is a built in detector for memory leak called C Runtime Library. When your program exits after the main function returns, CRT will check the debug heap of your application. if you have any blocks still allocated on the debug heap, then you have memory leak..


Search your code for occurrences of new, and make sure that they all occur within a constructor with a matching delete in a destructor. Make sure that this is the only possibly throwing operation in that constructor. A simple way to do this is to wrap all pointers in std::auto_ptr, or boost::scoped_ptr (depending on whether or not you need move semantics). For all future code just ensure that every resource is owned by an object that cleans up the resource in its destructor. If you need move semantics then you can upgrade to a compiler that supports r-value references (VS2010 does I believe) and create move constructors. If you don't want to do that then you can use a variety of tricky techniques involving conscientious usage of swap, or try the Boost.Move library.


You often don't need to define these classes yourself. The standard library containers behave in this way as well, so that any object stored into a std::vector gets freed when the vector is destroyed. So again, don't store a pointer into the container (which would require you to call new and delete), but rather the object itself (which gives you memory management for free). Likewise, smart pointer classes can be used to easily wrap objects that just have to be allocated with new, and control their lifetimes.


If you do this consistently throughout your code, you simply won't have any memory leaks. Everything that could get leaked is tied to a destructor which is guaranteed to be called when control leaves the scope in which the object was declared.


When you run your program under the Visual Studio debugger, Visual Leak Detector will output a memory leak report at the end of your debugging session. The leak report includes the full call stack showing how any leaked memory blocks were allocated. Double-click on a line in the call stack to jump to that file and line in the editor window.


Yeah, don't use manual memory management (if you ever call delete or delete[] manually, then you're doing it wrong). Use RAII and smart pointers, limit heap allocations to the absolute minimum (most of the time, automatic variables will suffice).

3a8082e126
Reply all
Reply to author
Forward
0 new messages