This issue can occur in hard disks once you try to copy or move files in the hard disk from one location to another.
It might prompt you to format the disk in order to proceed using the hard disk.
One of the reasons for this issue can be bad sectors in a damaged hard disk. If your file or folder which is corrupted is in a bad sector of the disk, then recovering those data would be difficult or sometimes, IMPOSSIBLE!
To recover your data you can try Windows copy, xcopy commands with options.
To repair the disk, use Windows CHKDSK /R command.
How to troubleshoot this issue?
Wednesday, December 21, 2011
Monday, December 19, 2011
Instruction prefetching!
Recently we came across an issue where our application will take relatively more time to process in the first time after some idle time than the subsequent executions that happen later.
So, the concept behind that strange behaviour is prefetching
First time the application is loaded from the memory it will cache that for further subsequent processing. Once the application is no longer requested by the user, it will dump the cache.
So, after some idle time it will have to load the application from the memory itself, thus causing some delay in the initial execution.
I might be terribly wrong here, but I was delighted to find out the reason for this weird issue, so I'm posing this for my own reference!
So, read @ your own risk! :P
So, the concept behind that strange behaviour is prefetching
First time the application is loaded from the memory it will cache that for further subsequent processing. Once the application is no longer requested by the user, it will dump the cache.
So, after some idle time it will have to load the application from the memory itself, thus causing some delay in the initial execution.
I might be terribly wrong here, but I was delighted to find out the reason for this weird issue, so I'm posing this for my own reference!
So, read @ your own risk! :P
How to pass arguments to a Windows batch file?
You can pass an argument to Windows batch file (.bat) using %1 in the batch file.
Ex: echo %1
Then, in command prompt you need to give argument (ex: > test.bat Jay) This will replace %1 in the batch file.
This willl display "jay" in command prompt.
Ex: echo %1
Then, in command prompt you need to give argument (ex: > test.bat Jay) This will replace %1 in the batch file.
This willl display "jay" in command prompt.
Tuesday, December 13, 2011
Wednesday, November 16, 2011
ANTLR warning "Multiple token rules can match input such as "Xa, Xi, Xe ", Tokens Xi, Xe were disabled for that input"
Have you come across the following warning when you build ANTLR grammer files?
This is due to a failure in NFA > DFA conversion. Creating DFA for the parser is not performed as expected. For NFA conversion, the default time-out value is set to 1000. You need to increase this value to fix the above issue using the following statement when you are building the grammer.
-Xconversiontimeout t (t standas for time-out value)
This is due to a failure in NFA > DFA conversion. Creating DFA for the parser is not performed as expected. For NFA conversion, the default time-out value is set to 1000. You need to increase this value to fix the above issue using the following statement when you are building the grammer.
-Xconversiontimeout t (t standas for time-out value)
Monday, November 14, 2011
How to troubleshoot "The breakpoint will not currently be hit. No symbols have been loaded for this document." issue when debugging?
If you are a Visual Studio developer, I'm sure you might have got this error atleast onece in your life. And I would call this as the "Most frustrating issue that can happen to any developer"
Because, you need to troubleshoot this may be for few days just to get a single breakpoint enabled.
As far as I know there is no clear cut solution for this issue. So, first try the following:
First Clean the solution ( Build > Clean Solution)
If it does not work, delete Bin and Obj folders and Build
Still no luck? Restart the Visual Stidio IDE
If non of these options work for you, go to Debug > Windows > Modules. It will show you the path which the symbols are loaded. You can check the symbol status there.
Because, you need to troubleshoot this may be for few days just to get a single breakpoint enabled.
As far as I know there is no clear cut solution for this issue. So, first try the following:
First Clean the solution ( Build > Clean Solution)
If it does not work, delete Bin and Obj folders and Build
Still no luck? Restart the Visual Stidio IDE
If non of these options work for you, go to Debug > Windows > Modules. It will show you the path which the symbols are loaded. You can check the symbol status there.
Tuesday, October 25, 2011
Do we need to pass a reference type argument to a method using REF keyword? - Part 02
Consider the following reference type variable x:
ArrayList x = new ArrayList()
Here, assume memory location of x is 2110 and it points to the memory location of the new object which can be 1110.
So, if you pass x variable to a method by reference without giving REF keyword, a copy of the reference, which resides in memory location 3110 is passed to the method with the value of 1110 which points to the same object.
But if you pass x variable to a method with REF keyword the original reference itself will be copied which in this case 2110.
For more info: when we should use REF keyword? - Part 01
ArrayList x = new ArrayList()
Here, assume memory location of x is 2110 and it points to the memory location of the new object which can be 1110.
So, if you pass x variable to a method by reference without giving REF keyword, a copy of the reference, which resides in memory location 3110 is passed to the method with the value of 1110 which points to the same object.
But if you pass x variable to a method with REF keyword the original reference itself will be copied which in this case 2110.
For more info: when we should use REF keyword? - Part 01
Monday, October 24, 2011
How to give quotation mark in C# String?
Use backslash ahead of the string you need to quote
Ex: string quotationMark = "\" Hi! \"";
Ex: string quotationMark = "\" Hi! \"";
Sunday, October 23, 2011
How to fix System.BadImageFormatException in 64-bit OS?
If you try to refere a dll which has a file format which CLR does not support, you will get this exception. In 64 bit OS, this can happen due to dll is having some 32 bit parts (COM components etc.) and it is being loaded as a 64 bit module.
To avoid that, you need to do the following:
To avoid that, you need to do the following:
- In Visual Studio, right click the project.
- In project properties, go to 'Build' tab
- In General section, select Platform target as x86 (default is 'Any CPU')
- Recompile the project and execute
Subscribe to:
Posts (Atom)