Many a time, it becomes necessary for us to write protect our USB flash drive so as to protect it from viruses and other malware programs. Because flash drives are so popular and most widely used to move data between computers, they are the prime target for attackers as a means to get infections spread around the computer world. Also, since USB drive is not a Read-Only Memory (ROM), the data inside it can easily be modified or deleted by malware programs.
How to Hack Symbian S60 Phones to Install Unsigned Applications and Get Rid of Certificate Errors
If you own a Nokia Symbian S60 phone, you will most likely be aware of the fact that it is not possible to install applications on it unless they are signed using a valid certificate. Have you been trying to install applications on your S60 3rd or 5th edition phone but ending up getting a certificate error? At times, this can be really annoying; but here is a smart solution to this problem!
Here in this post, I will show you how to hack your Symbian S60 3rd or 5th edition smartphone, so as to modify the phone’s firmware and completely bypass the mandatory signing requirement. So, once you are done with this one time hack, you should be able to install any compatible application including unsigned and those with an expired certificate.
Avoid WORMS In USB Devices
USB Devices like i-pod,pen drives e.t.c; brings viruses/worms which are bad since it disables a lot of features as well as it ruins memory the slows down the whole thing. It disables much of the removal process like Windows RegEdit.exe, MsConfig.exe and also TaskMan.exe. Variations of these also disables your keyboard during normal booting, floods your disk with virus files in the root directory and also the windows directory and some also floods your directory with Folder looking icons that is an executable..
So here are some tips in avoiding this:
Exiting Windows the Cool and Quick Way
Normally it takes a hell lot of time just Shutting down Windows, you have to move your mouse to the Start Button, click on it, move it again over Shut Down, click, then move it over the necessary option and click, then move the cursor over the OK button and once again (you guessed it) click.This whole process can be shortened by creating shortcuts on the Desktop which will shut down Windows at the click of a button. Start by creating a new shortcut( right click and select New> Shortcut). Then in the command line box, type (without the quotes.)
C++ - std::sort with a non-static compare method
Usually when you want to sort a std::vector or another container thats holds objects of a custom datatype, you just write a compare function that takes two such objects, does something to find out if one is less than the other, and returns true if it is. Then you pass the address of this function to std::sort and voila.
C++ - Discovering Memory Leaks
If you are working on a serious project, you will propably use a sophisticated memory manager which will also discover memory leaks (along with their exact position in the code), but if you just want to do a quick test in a small program, there is an easy way to let the debugger check for memory leaks:
- Include crtdbg.h in your project (this file is included in the Microsoft Platform SDK)
- At the beginning of main() or WinMain () put this code:
- Include crtdbg.h in your project (this file is included in the Microsoft Platform SDK)
- At the beginning of main() or WinMain () put this code:
int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
flag |= _CRTDBG_LEAK_CHECK_DF;
_CrtSetDbgFlag(flag);
This works in Visual C++ ( i don't know about other compilers though ) and, if you run the programm in debug mode, it will report memory leaks in the debug output window ("Immediate Window" in the latest Visual Studio version).C++ - Bitmap Tutorial: Loading and Saving Bitmaps
1. Introduction
The windows bitmap file format (.bmp) is the most widely used image file format on windows (next to .jpg), and there are many occasions a program or game has to be able to load or save bitmaps ( raytracers and other non-realtime renderers should be able to save their output in .bmp format, games might have to load them as textures etc. ).
Unfortunately .bmp files are not as straightforward as for example .png image files and provide quite a problem for newbies since it's not that easy to figure out how to use them when without a library or API.
Two notes before we start:
1) In this tutorial we're dealing with 24 bit bmps only. But it shouldn't be hard to change the code to support other formats.
2) For clarity's sake i'm only showing the code important to the task at hand, with only minimal error checking. If you want to use this code in a real program, you should add some exception handling.
The windows bitmap file format (.bmp) is the most widely used image file format on windows (next to .jpg), and there are many occasions a program or game has to be able to load or save bitmaps ( raytracers and other non-realtime renderers should be able to save their output in .bmp format, games might have to load them as textures etc. ).
Unfortunately .bmp files are not as straightforward as for example .png image files and provide quite a problem for newbies since it's not that easy to figure out how to use them when without a library or API.
Two notes before we start:
1) In this tutorial we're dealing with 24 bit bmps only. But it shouldn't be hard to change the code to support other formats.
2) For clarity's sake i'm only showing the code important to the task at hand, with only minimal error checking. If you want to use this code in a real program, you should add some exception handling.
C# - Non-blocking Per-Pixel Painting in Windows Forms
WinForms gives us the PictureBox control, into which we can easily load images of different formats, have them scaled for us, etc.
But, unfortunately, PictureBox gives us no obvious way to paint it ourself via some SetPixel method.
In this article i will thus show you how to implement your own SetPixel method. As you will know, when you directly execute a long-running function, the user interface will be unresponsive (you won't be able to move the window, or click anything on it) until the function has finished running. When painting something, your paint method might be very long running (for example if you do raytracing), so we will do our painting in a background thread. This will only add a few lines of code, but keep the application running smooth.
Also, since there are different ways to achieve our goals, i will split this article up into two parts, showing you different methods of how to achieve the same effect.
For the rest of this article, i assume that we have a Windows Forms project, and that the form contains a PictureBox named pictureBox1, and a Button (named button1), which will start our test-rendering.
But, unfortunately, PictureBox gives us no obvious way to paint it ourself via some SetPixel method.
In this article i will thus show you how to implement your own SetPixel method. As you will know, when you directly execute a long-running function, the user interface will be unresponsive (you won't be able to move the window, or click anything on it) until the function has finished running. When painting something, your paint method might be very long running (for example if you do raytracing), so we will do our painting in a background thread. This will only add a few lines of code, but keep the application running smooth.
Also, since there are different ways to achieve our goals, i will split this article up into two parts, showing you different methods of how to achieve the same effect.
For the rest of this article, i assume that we have a Windows Forms project, and that the form contains a PictureBox named pictureBox1, and a Button (named button1), which will start our test-rendering.
C# - How to Reverse a Unicode String
Perhaps due to the lack of a built-in String.Reverse method in the .NET Framework, it's very common for implementations of such a method to be posted.
Unfortunately, most of these implementations do not handle characters outside Unicode's Basic Multilingual Plane correctly. These supplementary characters have code points between U+10000 and U+10FFFF and so cannot be represented with one 16-bit char. In UTF-16 (which is how .NET strings are encoded), these Unicode characters are represented as two C# chars, a high surrogatefollowed by a low surrogate. When the string is reversed, the order of these two chars has to be preserved.
Here's our method that reverses a string while handling surrogate code units correctly:
C# - How to Reverse a String
Unfortunately, C#'s string class is missing a Reverse() function, so here are three ways to reverse strings:
1. Manual Reversal
The most obvious way is to reverse a string by manually walking through it character for character and building a new string:
1. Manual Reversal
The most obvious way is to reverse a string by manually walking through it character for character and building a new string:
string input = "hello world"; string output = ""; for (int i = input.Length - 1; i >= 0; i--) { output += input[i]; }Note that if you take this approach in a serious program, you should use StringBuilder instead of string, since in the above code, a new temporary string is created each time you add a single character to the output string.
Subscribe to:
Posts (Atom)