Thursday, February 27, 2014

Kill Processes using Command Prompt in Windows 7 | 8

If your Task Manager gets stuck or unresponsive due to intensive apps and you are not able to kill the particular process. What do u do ? You press ctrl alt delete to open up task manager and find the culprit. But you can kill also multiple processes using command prompt in Windows 7.

Kill Processes using Command Prompt in Windows 7 | 8

To do so, open the Command Prompt in the Administrative privileges mode and run the tasklistcommand, it will show you a list of all the running processes.



To views the processes, type Taskview and hit Enter.

To kill any particular process use the Taskkill command. For example to kill Chrome, run the command as:

Taskkill /IM chrome.exe /F

where /F is used to kill the process forcefully. You can also kill any particular process by using it’s ID, the tasklist command displays the process ID’s as well (you can see the PID column in the screenshot). To kill any process using it’s ID, run the command as:

Taskkill /PID 2704 /F

Now to kill multiple processes simultaneously, run the above command with the PID’s of all the processes followed by spaces

Taskkill /PID 2704 5472 4344 /F

That's it!

Last edited by knightrider™; 11-17-2009 at 11:25 AM.

http://forum.thewindowsclub.com/windows-tips-tutorials-articles/29463-kill-processes-using-command-prompt-windows-7-8-a.html

A cycle was detected in the build path of project xxx - Build Path Problem

Mark Circular dependcies as "Warning" in Eclipse tool to avoid "A CYCLE WAS DETECTED IN THE BUILD PATH" error. In Eclipse got to :-> Windows -> Prefereneces -> Java-> Compiler -> Buliding -> Circular Depencies
Thanks

Tuesday, February 25, 2014

MySQL Workbench – Error Code: 1175. You are using safe update mode

When you execute the update/delete request in MySQL workbench and you got the message error as:
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
And in MySQL Workbench also mention how we solve this issue as well by following message:
To disable safe mode, toggle the option in Preferences -> SQL Editor -> Query Editor and reconnect
Every found that kind of error when trying to update rows in MySQL? It’s because you tried to update a table without a WHERE that uses a KEY column. In my case, I don’t use even WHERE clause:
?
1
2
3
delete from order_detail;
 
delete from order;
Any way, the quick fix is to add SET SQL_SAFE_UPDATES=0; before your update/delete query.
?
1
2
3
4
SET SQL_SAFE_UPDATES=0;
delete from order_detail;
 
delete from order;
Or follow what MySQL Workbench mentioned as here:
To disable safe mode, toggle the option in Preferences -> SQL Editor -> Query Editor and reconnect
Here is the screenshot in MySQL Workbench 5.2.40 CE

Saturday, February 22, 2014

Understanding domain objects/services

Different people use these terms in somewhat different ways, but here's my take:
1) "Business" and "domain" are roughly synonyms. "Domain" is a bit more general in that it doesn't make the assumption that you're writing a business application. So if we were writing a scientific app or a game, we might prefer to refer to the relevant part of the code as "domain" code rather than "business" code. So in the remainder of this explanation I'll use "domain" since it's more general.
2) "Domain logic" comprehends both "domain objects" and "domain services". For various reasons (technical and otherwise) many architectures employ a design where the domain logic is divided into objects for storing data ("domain objects") and objects that manipulate those ("domain services"). Martin Fowler and others have pointed out that that's not very OO since a big part of the OO concept is to put functionality together with data, and that's right, but it is what it is. Domain objects are the data and domain services are the do-stuff-with-the-data part.
3) In domain-driven design, the idea is to get back to true OO design, and so the various service methods make their way back to the domain objects so that you have objects in the OO sense rather than what are sometimes called "anemic" objects. In a DDD the domain objects themselves are more robust and so they form the domain logic. In reality there may still be some domain services too, but this is typically smaller in a DDD than in a more traditional domain objects vs. services model.

SQL SERVER – Stored Procedures Advantages and Best Advantage

There are many advantages of Stored Procedures. I was once asked what do I think is the most important feature of Stored Procedure? I have to pick only ONE. It is tough question.
I answered : Execution Plan Retention and Reuse (SP are compiled and their execution plan is cached and used again to when the same SP is executed again)
Not to mentioned I received the second question following my answer : Why? Because all the other advantage known (they are mentioned below) of SP can be achieved without using SP. Though Execution Plan Retention and Reuse can only be achieved using Stored Procedure only.
  • Execution plan retention and reuse
  • Query auto-parameterization
  • Encapsulation of business rules and policies
  • Application modularization
  • Sharing of application logic between applications
  • Access to database objects that is both secure and uniform
  • Consistent, safe data modification
  • Network bandwidth conservation
  • Support for automatic execution at system start-up
  • Enhanced hardware and software capabilities
  • Improved security
  • Reduced development cost and increased reliability
  • Centralized security, administration, and maintenance for common routines
Reference : Pinal Dave (http://blog.SQLAuthority.com)

Friday, February 21, 2014

WAS v6.1.x fails to start with error ADMU7704E: Failed while trying to start the Windows Service

Technote (troubleshooting)


Problem(Abstract)

Attempts to start IBM WebSphere Application Server (WAS) v6.1.x through Rational Application Developer for WebSphere Software (RAD) v7.0.x results in the error ADMU7704E: Failed while trying to start the Windows Service associated with server.

Symptom

Complete error while starting WebSphere Application Server (WAS) v6.1.x:

ADMU7704E: Failed while trying to start the Windows Service associated with server: server1;
probable error executing WASService.exe: Starting Service: [service name]
Timed out waiting for service to respond to command, after 60 seconds.Failed to start service, or
timed out while waiting for start to complete. Check the logs for details.


Cause

The server was configured as a Windows Service.

Resolving the problem

If this was unintentional, create a new server profile that does not run the application as a Windows Service.

Steps describing how to do this can be found in the Related URL section.

Alternatively, you can do the following:
  1. Open Windows Services Control Panel (Start > Settings > Control Panel > Administrative Tools > Services).
  2. Look for the service name of WAS V6.1:

    "IBM WebSphere Application Server V6.1 - [service_name]".
  3. Open a command window and go to [RAD_Installation]\runtimes\base_v61\bin
  4. Run the command:

    WASService.exe -remove [service_name]

    You should see a message "Successfully removed service".

Restart RAD and you should now be able to successfully start your WASv6.1.x server.

Related information


Java: iterate through HashMap [duplicate]

If you're only interested in the keys, you can iterate through the keySet() of the map:
Map<String, Object> map = ...;

for (String key : map.keySet()) {
    // ...
}
If you only need the values, use values():
for (Object value : map.values()) {
    // ...
}
Finally, if you want both the key and value, use entrySet():
for (Map.Entry<String, Object> entry : map.entrySet()) {
    String key = entry.getKey();
    Object value = entry.getValue();
    // ...
}
One caveat: if you want to remove items mid-iteration, you'll need to do so via an Iterator (see karim79's answer). However, changing item values is OK (see Map.Entry).